<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/socket.c, branch v2.6.16</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v2.6.16</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v2.6.16'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2006-02-05T19:06:51Z</updated>
<entry>
<title>[PATCH] percpu data: only iterate over possible CPUs</title>
<updated>2006-02-05T19:06:51Z</updated>
<author>
<name>Eric Dumazet</name>
<email>dada1@cosmosbay.com</email>
</author>
<published>2006-02-05T07:27:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=88a2a4ac6b671a4b0dd5d2d762418904c05f4104'/>
<id>urn:sha1:88a2a4ac6b671a4b0dd5d2d762418904c05f4104</id>
<content type='text'>
percpu_data blindly allocates bootmem memory to store NR_CPUS instances of
cpudata, instead of allocating memory only for possible cpus.

As a preparation for changing that, we need to convert various 0 -&gt; NR_CPUS
loops to use for_each_cpu().

(The above only applies to users of asm-generic/percpu.h.  powerpc has gone it
alone and is presently only allocating memory for present CPUs, so it's
currently corrupting memory).

Signed-off-by: Eric Dumazet &lt;dada1@cosmosbay.com&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: James Bottomley &lt;James.Bottomley@steeleye.com&gt;
Acked-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Jens Axboe &lt;axboe@suse.de&gt;
Cc: Anton Blanchard &lt;anton@samba.org&gt;
Acked-by: William Irwin &lt;wli@holomorphy.com&gt;
Cc: Andi Kleen &lt;ak@muc.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
<entry>
<title>[NET]: Remove more unneeded typecasts on *malloc()</title>
<updated>2006-01-12T00:32:14Z</updated>
<author>
<name>Kris Katterjohn</name>
<email>kjak@users.sourceforge.net</email>
</author>
<published>2006-01-11T23:56:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8b3a70058bfe711b2d05ba2134178bae623183ce'/>
<id>urn:sha1:8b3a70058bfe711b2d05ba2134178bae623183ce</id>
<content type='text'>
This removes more unneeded casts on the return value for kmalloc(),
sock_kmalloc(), and vmalloc().

Signed-off-by: Kris Katterjohn &lt;kjak@users.sourceforge.net&gt;
Acked-by: James Morris &lt;jmorris@namei.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[NET]: Add a dev_ioctl() fallback to sock_ioctl()</title>
<updated>2006-01-03T22:18:33Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2006-01-03T22:18:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b5e5fa5e093e42cab4ee3d6dcbc4f450ad29a723'/>
<id>urn:sha1:b5e5fa5e093e42cab4ee3d6dcbc4f450ad29a723</id>
<content type='text'>
Currently all network protocols need to call dev_ioctl as the default
fallback in their ioctl implementations.  This patch adds a fallback
to dev_ioctl to sock_ioctl if the protocol returned -ENOIOCTLCMD.
This way all the procotol ioctl handlers can be simplified and we don't
need to export dev_ioctl.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[NET]: restructure sock_aio_{read,write} / sock_{readv,writev}</title>
<updated>2006-01-03T21:11:18Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2005-12-23T05:08:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ce1d4d3e88b3a69d23c3feb436a0b36b6ca0642b'/>
<id>urn:sha1:ce1d4d3e88b3a69d23c3feb436a0b36b6ca0642b</id>
<content type='text'>
Mid-term I plan to restructure the file_operations so that we don't need
to have all these duplicate aio and vectored versions.  This patch is
a small step in that direction but also a worthwile cleanup on it's own:

(1) introduce a alloc_sock_iocb helper that encapsulates allocating a
    proper sock_iocb
(2) add do_sock_read and do_sock_write helpers for common read/write
    code

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[NET]: Fix sock_init() return value.</title>
<updated>2006-01-03T21:11:17Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@sunset.davemloft.net</email>
</author>
<published>2005-12-22T20:58:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cbeb321a64af5437fbde249605b191ff0fdfa21c'/>
<id>urn:sha1:cbeb321a64af5437fbde249605b191ff0fdfa21c</id>
<content type='text'>
It needs to return zero now that it is an initcall.

Also, net/nonet.c no longer needs a dummy sock_init().

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[NET]: Small cleanup to socket initialization</title>
<updated>2006-01-03T21:11:14Z</updated>
<author>
<name>Andi Kleen</name>
<email>ak@suse.de</email>
</author>
<published>2005-12-22T20:43:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=77d76ea310b50a9c8ff15bd290fcb4ed4961adf2'/>
<id>urn:sha1:77d76ea310b50a9c8ff15bd290fcb4ed4961adf2</id>
<content type='text'>
sock_init can be done as a core_initcall instead of calling
it directly in init/main.c

Also I removed an out of date #ifdef.

Signed-off-by: Andi Kleen &lt;ak@suse.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[NET]: Fix module reference counts for loadable protocol modules</title>
<updated>2005-09-27T22:23:38Z</updated>
<author>
<name>Frank Filz</name>
<email>ffilzlnx@us.ibm.com</email>
</author>
<published>2005-09-27T22:23:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a79af59efd20990473d579b1d8d70bb120f0920c'/>
<id>urn:sha1:a79af59efd20990473d579b1d8d70bb120f0920c</id>
<content type='text'>
I have been experimenting with loadable protocol modules, and ran into
several issues with module reference counting.

The first issue was that __module_get failed at the BUG_ON check at
the top of the routine (checking that my module reference count was
not zero) when I created the first socket. When sk_alloc() is called,
my module reference count was still 0. When I looked at why sctp
didn't have this problem, I discovered that sctp creates a control
socket during module init (when the module ref count is not 0), which
keeps the reference count non-zero. This section has been updated to
address the point Stephen raised about checking the return value of
try_module_get().

The next problem arose when my socket init routine returned an error.
This resulted in my module reference count being decremented below 0.
My socket ops-&gt;release routine was also being called. The issue here
is that sock_release() calls the ops-&gt;release routine and decrements
the ref count if sock-&gt;ops is not NULL. Since the socket probably
didn't get correctly initialized, this should not be done, so we will
set sock-&gt;ops to NULL because we will not call try_module_get().

While searching for another bug, I also noticed that sys_accept() has
a possibility of doing a module_put() when it did not do an
__module_get so I re-ordered the call to security_socket_accept().

Signed-off-by: Frank Filz &lt;ffilzlnx@us.ibm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[NET]: Make sure ctl buffer is aligned properly in sys_sendmsg().</title>
<updated>2005-09-26T21:28:02Z</updated>
<author>
<name>Alex Williamson</name>
<email>alex.williamson@hp.com</email>
</author>
<published>2005-09-26T21:28:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b9d717a7b413f227ebb2d61d9c118335f7292137'/>
<id>urn:sha1:b9d717a7b413f227ebb2d61d9c118335f7292137</id>
<content type='text'>
It's on the stack and declared as "unsigned char[]", but pointers
and similar can be in here thus we need to give it an explicit
alignment attribute.

Signed-off-by: Alex Williamson &lt;alex.williamson@hp.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[NET]: Do not leak MSG_CMSG_COMPAT into userspace.</title>
<updated>2005-09-16T23:51:01Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2005-09-16T23:51:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=37f7f421cce13435fdc0d870caf51141e5ebf079'/>
<id>urn:sha1:37f7f421cce13435fdc0d870caf51141e5ebf079</id>
<content type='text'>
Noticed by Sridhar Samudrala.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[PATCH] Fix 32bit sendmsg() flaw</title>
<updated>2005-09-08T15:14:11Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2005-09-08T01:28:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8920e8f94c44e31a73bdf923b04721e26e88cadd'/>
<id>urn:sha1:8920e8f94c44e31a73bdf923b04721e26e88cadd</id>
<content type='text'>
When we copy 32bit -&gt;msg_control contents to kernel, we walk the same
userland data twice without sanity checks on the second pass.

Second version of this patch: the original broke with 64-bit arches
running 32-bit-compat-mode executables doing sendmsg() syscalls with
unaligned CMSG data areas

Another thing is that we use kmalloc() to allocate and sock_kfree_s()
to free afterwards; less serious, but also needs fixing.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: David Woodhouse &lt;dwmw2@infradead.org&gt;
Signed-off-by: Chris Wright &lt;chrisw@osdl.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@osdl.org&gt;
</content>
</entry>
</feed>
