<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/net/sctp/socket.c, branch v2.6.31</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>sctp: fix warning at inet_sock_destruct() while release sctp socket</title>
<updated>2009-07-06T19:47:08+00:00</updated>
<author>
<name>Wei Yongjun</name>
<email>yjwei@cn.fujitsu.com</email>
</author>
<published>2009-07-05T19:45:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=1bc4ee4088c9a502db0e9c87f675e61e57fa1734'/>
<id>1bc4ee4088c9a502db0e9c87f675e61e57fa1734</id>
<content type='text'>
Commit 'net: Move rx skb_orphan call to where needed' broken sctp protocol
with warning at inet_sock_destruct(). Actually, sctp can do this right with
sctp_sock_rfree_frag() and sctp_skb_set_owner_r_frag() pair.

    sctp_sock_rfree_frag(skb);
    sctp_skb_set_owner_r_frag(skb, newsk);

This patch not revert the commit d55d87fdff8252d0e2f7c28c2d443aee17e9d70f,
instead remove the sctp_sock_rfree_frag() function.

------------[ cut here ]------------
WARNING: at net/ipv4/af_inet.c:151 inet_sock_destruct+0xe0/0x142()
Modules linked in: sctp ipv6 dm_mirror dm_region_hash dm_log dm_multipath
scsi_mod ext3 jbd uhci_hcd ohci_hcd ehci_hcd [last unloaded: scsi_wait_scan]
Pid: 1808, comm: sctp_test Not tainted 2.6.31-rc2 #40
Call Trace:
 [&lt;c042dd06&gt;] warn_slowpath_common+0x6a/0x81
 [&lt;c064a39a&gt;] ? inet_sock_destruct+0xe0/0x142
 [&lt;c042dd2f&gt;] warn_slowpath_null+0x12/0x15
 [&lt;c064a39a&gt;] inet_sock_destruct+0xe0/0x142
 [&lt;c05fde44&gt;] __sk_free+0x19/0xcc
 [&lt;c05fdf50&gt;] sk_free+0x18/0x1a
 [&lt;ca0d14ad&gt;] sctp_close+0x192/0x1a1 [sctp]
 [&lt;c0649f7f&gt;] inet_release+0x47/0x4d
 [&lt;c05fba4d&gt;] sock_release+0x19/0x5e
 [&lt;c05fbab3&gt;] sock_close+0x21/0x25
 [&lt;c049c31b&gt;] __fput+0xde/0x189
 [&lt;c049c3de&gt;] fput+0x18/0x1a
 [&lt;c049988f&gt;] filp_close+0x56/0x60
 [&lt;c042f422&gt;] put_files_struct+0x5d/0xa1
 [&lt;c042f49f&gt;] exit_files+0x39/0x3d
 [&lt;c043086a&gt;] do_exit+0x1a5/0x5dd
 [&lt;c04a86c2&gt;] ? d_kill+0x35/0x3b
 [&lt;c0438fa4&gt;] ? dequeue_signal+0xa6/0x115
 [&lt;c0430d05&gt;] do_group_exit+0x63/0x8a
 [&lt;c0439504&gt;] get_signal_to_deliver+0x2e1/0x2f9
 [&lt;c0401d9e&gt;] do_notify_resume+0x7c/0x6b5
 [&lt;c043f601&gt;] ? autoremove_wake_function+0x0/0x34
 [&lt;c04a864e&gt;] ? __d_free+0x3d/0x40
 [&lt;c04a867b&gt;] ? d_free+0x2a/0x3c
 [&lt;c049ba7e&gt;] ? vfs_write+0x103/0x117
 [&lt;c05fc8fa&gt;] ? sys_socketcall+0x178/0x182
 [&lt;c0402a56&gt;] work_notifysig+0x13/0x19
---[ end trace 9db92c463e789fba ]---

Signed-off-by: Wei Yongjun &lt;yjwei@cn.fujitsu.com&gt;
Acked-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Acked-by: Vlad Yasevich &lt;vladislav.yasevich@hp.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit 'net: Move rx skb_orphan call to where needed' broken sctp protocol
with warning at inet_sock_destruct(). Actually, sctp can do this right with
sctp_sock_rfree_frag() and sctp_skb_set_owner_r_frag() pair.

    sctp_sock_rfree_frag(skb);
    sctp_skb_set_owner_r_frag(skb, newsk);

This patch not revert the commit d55d87fdff8252d0e2f7c28c2d443aee17e9d70f,
instead remove the sctp_sock_rfree_frag() function.

------------[ cut here ]------------
WARNING: at net/ipv4/af_inet.c:151 inet_sock_destruct+0xe0/0x142()
Modules linked in: sctp ipv6 dm_mirror dm_region_hash dm_log dm_multipath
scsi_mod ext3 jbd uhci_hcd ohci_hcd ehci_hcd [last unloaded: scsi_wait_scan]
Pid: 1808, comm: sctp_test Not tainted 2.6.31-rc2 #40
Call Trace:
 [&lt;c042dd06&gt;] warn_slowpath_common+0x6a/0x81
 [&lt;c064a39a&gt;] ? inet_sock_destruct+0xe0/0x142
 [&lt;c042dd2f&gt;] warn_slowpath_null+0x12/0x15
 [&lt;c064a39a&gt;] inet_sock_destruct+0xe0/0x142
 [&lt;c05fde44&gt;] __sk_free+0x19/0xcc
 [&lt;c05fdf50&gt;] sk_free+0x18/0x1a
 [&lt;ca0d14ad&gt;] sctp_close+0x192/0x1a1 [sctp]
 [&lt;c0649f7f&gt;] inet_release+0x47/0x4d
 [&lt;c05fba4d&gt;] sock_release+0x19/0x5e
 [&lt;c05fbab3&gt;] sock_close+0x21/0x25
 [&lt;c049c31b&gt;] __fput+0xde/0x189
 [&lt;c049c3de&gt;] fput+0x18/0x1a
 [&lt;c049988f&gt;] filp_close+0x56/0x60
 [&lt;c042f422&gt;] put_files_struct+0x5d/0xa1
 [&lt;c042f49f&gt;] exit_files+0x39/0x3d
 [&lt;c043086a&gt;] do_exit+0x1a5/0x5dd
 [&lt;c04a86c2&gt;] ? d_kill+0x35/0x3b
 [&lt;c0438fa4&gt;] ? dequeue_signal+0xa6/0x115
 [&lt;c0430d05&gt;] do_group_exit+0x63/0x8a
 [&lt;c0439504&gt;] get_signal_to_deliver+0x2e1/0x2f9
 [&lt;c0401d9e&gt;] do_notify_resume+0x7c/0x6b5
 [&lt;c043f601&gt;] ? autoremove_wake_function+0x0/0x34
 [&lt;c04a864e&gt;] ? __d_free+0x3d/0x40
 [&lt;c04a867b&gt;] ? d_free+0x2a/0x3c
 [&lt;c049ba7e&gt;] ? vfs_write+0x103/0x117
 [&lt;c05fc8fa&gt;] ? sys_socketcall+0x178/0x182
 [&lt;c0402a56&gt;] work_notifysig+0x13/0x19
---[ end trace 9db92c463e789fba ]---

Signed-off-by: Wei Yongjun &lt;yjwei@cn.fujitsu.com&gt;
Acked-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Acked-by: Vlad Yasevich &lt;vladislav.yasevich@hp.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net: correct off-by-one write allocations reports</title>
<updated>2009-06-18T07:29:12+00:00</updated>
<author>
<name>Eric Dumazet</name>
<email>eric.dumazet@gmail.com</email>
</author>
<published>2009-06-18T02:05:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=31e6d363abcd0d05766c82f1a9c905a4c974a199'/>
<id>31e6d363abcd0d05766c82f1a9c905a4c974a199</id>
<content type='text'>
commit 2b85a34e911bf483c27cfdd124aeb1605145dc80
(net: No more expensive sock_hold()/sock_put() on each tx)
changed initial sk_wmem_alloc value.

We need to take into account this offset when reporting
sk_wmem_alloc to user, in PROC_FS files or various
ioctls (SIOCOUTQ/TIOCOUTQ)

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 2b85a34e911bf483c27cfdd124aeb1605145dc80
(net: No more expensive sock_hold()/sock_put() on each tx)
changed initial sk_wmem_alloc value.

We need to take into account this offset when reporting
sk_wmem_alloc to user, in PROC_FS files or various
ioctls (SIOCOUTQ/TIOCOUTQ)

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sctp: Use frag list abstraction interfaces.</title>
<updated>2009-06-09T07:24:07+00:00</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2009-06-09T07:22:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=1b003be39e91a6cd013c9ea580ccc24d1fac9959'/>
<id>1b003be39e91a6cd013c9ea580ccc24d1fac9959</id>
<content type='text'>
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sctp: support non-blocking version of the new sctp_connectx() API</title>
<updated>2009-06-03T13:14:47+00:00</updated>
<author>
<name>Vlad Yasevich</name>
<email>vladislav.yasevich@hp.com</email>
</author>
<published>2009-06-01T16:41:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=c6ba68a26645dbc5029a9faa5687ebe6fcfc53e4'/>
<id>c6ba68a26645dbc5029a9faa5687ebe6fcfc53e4</id>
<content type='text'>
Prior implementation of the new sctp_connectx() call that returns
an association ID did not work correctly on non-blocking socket.
This is because we could not return both a EINPROGRESS error and
an association id.  This is a new implementation that supports this.

Originally from Ivan Skytte Jørgensen &lt;isj-sctp@i1.dk

Signed-off-by: Ivan Skytte Jørgensen &lt;isj-sctp@i1.dk
Signed-off-by: Vlad Yasevich &lt;vladislav.yasevich@hp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Prior implementation of the new sctp_connectx() call that returns
an association ID did not work correctly on non-blocking socket.
This is because we could not return both a EINPROGRESS error and
an association id.  This is a new implementation that supports this.

Originally from Ivan Skytte Jørgensen &lt;isj-sctp@i1.dk

Signed-off-by: Ivan Skytte Jørgensen &lt;isj-sctp@i1.dk
Signed-off-by: Vlad Yasevich &lt;vladislav.yasevich@hp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sctp: simplify sctp listening code</title>
<updated>2009-03-13T18:37:56+00:00</updated>
<author>
<name>Vlad Yasevich</name>
<email>vladislav.yasevich@hp.com</email>
</author>
<published>2009-03-12T09:49:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=5e8f3f703ae4e4af65e2695e486b3cd198328863'/>
<id>5e8f3f703ae4e4af65e2695e486b3cd198328863</id>
<content type='text'>
sctp_inet_listen() call is split between UDP and TCP style.  Looking
at the code, the two functions are almost the same and can be
merged into a single helper.  This also fixes a bug that was
fixed in the UDP function, but missed in the TCP function.

Signed-off-by: Vlad Yasevich &lt;vladislav.yasevich@hp.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
sctp_inet_listen() call is split between UDP and TCP style.  Looking
at the code, the two functions are almost the same and can be
merged into a single helper.  This also fixes a bug that was
fixed in the UDP function, but missed in the TCP function.

Signed-off-by: Vlad Yasevich &lt;vladislav.yasevich@hp.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sctp: fix the length check in sctp_getsockopt_maxburst()</title>
<updated>2009-03-03T06:49:17+00:00</updated>
<author>
<name>Wei Yongjun</name>
<email>yjwei@cn.fujitsu.com</email>
</author>
<published>2009-03-02T09:46:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=c6db93a58f1745cfe1acc2e1a1d68afc3245eced'/>
<id>c6db93a58f1745cfe1acc2e1a1d68afc3245eced</id>
<content type='text'>
The code in sctp_getsockopt_maxburst() doesn't allow len to be larger
then struct sctp_assoc_value, which is a common case where app writers
just pass down the sizeof(buf) or something similar.

This patch fix the problem.

Signed-off-by: Wei Yongjun &lt;yjwei@cn.fujitsu.com&gt;
Signed-off-by: Vlad Yasevich &lt;vladislav.yasevich@hp.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The code in sctp_getsockopt_maxburst() doesn't allow len to be larger
then struct sctp_assoc_value, which is a common case where app writers
just pass down the sizeof(buf) or something similar.

This patch fix the problem.

Signed-off-by: Wei Yongjun &lt;yjwei@cn.fujitsu.com&gt;
Signed-off-by: Vlad Yasevich &lt;vladislav.yasevich@hp.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sctp: remove dup code in net/sctp/socket.c</title>
<updated>2009-03-03T06:49:16+00:00</updated>
<author>
<name>Wei Yongjun</name>
<email>yjwei@cn.fujitsu.com</email>
</author>
<published>2009-03-02T09:46:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=d212318c9d1b11ff44b57f90b4f9d9c9b31a6ced'/>
<id>d212318c9d1b11ff44b57f90b4f9d9c9b31a6ced</id>
<content type='text'>
Remove dup check of "if (optlen &lt; sizeof(int))".

Signed-off-by: Wei Yongjun &lt;yjwei@cn.fujitsu.com&gt;
Signed-off-by: Vlad Yasevich &lt;vladislav.yasevich@hp.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove dup check of "if (optlen &lt; sizeof(int))".

Signed-off-by: Wei Yongjun &lt;yjwei@cn.fujitsu.com&gt;
Signed-off-by: Vlad Yasevich &lt;vladislav.yasevich@hp.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sctp: Inherit all socket options from parent correctly.</title>
<updated>2009-02-16T08:03:11+00:00</updated>
<author>
<name>Vlad Yasevich</name>
<email>vladislav.yasevich@hp.com</email>
</author>
<published>2009-02-13T08:33:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=914e1c8b6980c516667375d3e55f0b6e674c8c58'/>
<id>914e1c8b6980c516667375d3e55f0b6e674c8c58</id>
<content type='text'>
During peeloff/accept() sctp needs to save the parent socket state
into the new socket so that any options set on the parent are
inherited by the child socket.  This was found when the
parent/listener socket issues SO_BINDTODEVICE, but the
data was misrouted after a route cache flush.

Signed-off-by: Vlad Yasevich &lt;vladislav.yasevich@hp.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
During peeloff/accept() sctp needs to save the parent socket state
into the new socket so that any options set on the parent are
inherited by the child socket.  This was found when the
parent/listener socket issues SO_BINDTODEVICE, but the
data was misrouted after a route cache flush.

Signed-off-by: Vlad Yasevich &lt;vladislav.yasevich@hp.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>trivial: fix then -&gt; than typos in comments and documentation</title>
<updated>2009-01-06T10:28:06+00:00</updated>
<author>
<name>Frederik Schwarzer</name>
<email>schwarzerf@gmail.com</email>
</author>
<published>2008-10-16T17:02:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=025dfdafe77f20b3890981a394774baab7b9c827'/>
<id>025dfdafe77f20b3890981a394774baab7b9c827</id>
<content type='text'>
- (better, more, bigger ...) then -&gt; (...) than

Signed-off-by: Frederik Schwarzer &lt;schwarzerf@gmail.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- (better, more, bigger ...) then -&gt; (...) than

Signed-off-by: Frederik Schwarzer &lt;schwarzerf@gmail.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sctp: Add validity check for SCTP_PARTIAL_DELIVERY_POINT socket option</title>
<updated>2008-12-26T00:59:03+00:00</updated>
<author>
<name>Wei Yongjun</name>
<email>yjwei@cn.fujitsu.com</email>
</author>
<published>2008-12-26T00:59:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=8510b937ae1e23583abdeb828cad5c518295c61d'/>
<id>8510b937ae1e23583abdeb828cad5c518295c61d</id>
<content type='text'>
The latest ietf socket extensions API draft said:

  8.1.21.  Set or Get the SCTP Partial Delivery Point

    Note also that the call will fail if the user attempts to set
    this value larger than the socket receive buffer size.

This patch add this validity check for SCTP_PARTIAL_DELIVERY_POINT
socket option.

Signed-off-by: Wei Yongjun &lt;yjwei@cn.fujitsu.com&gt;
Signed-off-by: Vlad Yasevich &lt;vladislav.yasevich@hp.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The latest ietf socket extensions API draft said:

  8.1.21.  Set or Get the SCTP Partial Delivery Point

    Note also that the call will fail if the user attempts to set
    this value larger than the socket receive buffer size.

This patch add this validity check for SCTP_PARTIAL_DELIVERY_POINT
socket option.

Signed-off-by: Wei Yongjun &lt;yjwei@cn.fujitsu.com&gt;
Signed-off-by: Vlad Yasevich &lt;vladislav.yasevich@hp.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
