<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/net/sctp/socket.c, branch v2.6.32</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>sctp: Fix regression introduced by new sctp_connectx api</title>
<updated>2009-11-14T03:56:51+00:00</updated>
<author>
<name>Vlad Yasevich</name>
<email>vladislav.yasevich@hp.com</email>
</author>
<published>2009-11-11T08:19:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=f9c67811ebc00a42f62f5d542d3abd36bd49ae35'/>
<id>f9c67811ebc00a42f62f5d542d3abd36bd49ae35</id>
<content type='text'>
A new (unrealeased to the user) sctp_connectx api

c6ba68a26645dbc5029a9faa5687ebe6fcfc53e4
    sctp: support non-blocking version of the new sctp_connectx() API

introduced a regression cought by the user regression test
suite.  In particular, the API requires the user library to
re-allocate the buffer and could potentially trigger a SIGFAULT.

This change corrects that regression by passing the original
address buffer to the kernel unmodified, but still allows for
a returned association id.

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>
A new (unrealeased to the user) sctp_connectx api

c6ba68a26645dbc5029a9faa5687ebe6fcfc53e4
    sctp: support non-blocking version of the new sctp_connectx() API

introduced a regression cought by the user regression test
suite.  In particular, the API requires the user library to
re-allocate the buffer and could potentially trigger a SIGFAULT.

This change corrects that regression by passing the original
address buffer to the kernel unmodified, but still allows for
a returned association id.

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: Set source addresses on the association before adding transports</title>
<updated>2009-11-14T03:56:50+00:00</updated>
<author>
<name>Vlad Yasevich</name>
<email>vladislav.yasevich@hp.com</email>
</author>
<published>2009-11-10T08:57:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=409b95aff3583c05ac7a9247fa3d8c9aa7f9cae3'/>
<id>409b95aff3583c05ac7a9247fa3d8c9aa7f9cae3</id>
<content type='text'>
Recent commit 8da645e101a8c20c6073efda3c7cc74eec01b87f
	sctp: Get rid of an extra routing lookup when adding a transport
introduced a regression in the connection setup.  The behavior was

different between IPv4 and IPv6.  IPv4 case ended up working because the
route lookup routing returned a NULL route, which triggered another
route lookup later in the output patch that succeeded.  In the IPv6 case,
a valid route was returned for first call, but we could not find a valid
source address at the time since the source addresses were not set on the
association yet.  Thus resulted in a hung connection.

The solution is to set the source addresses on the association prior to
adding peers.

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>
Recent commit 8da645e101a8c20c6073efda3c7cc74eec01b87f
	sctp: Get rid of an extra routing lookup when adding a transport
introduced a regression in the connection setup.  The behavior was

different between IPv4 and IPv6.  IPv4 case ended up working because the
route lookup routing returned a NULL route, which triggered another
route lookup later in the output patch that succeeded.  In the IPv6 case,
a valid route was returned for first call, but we could not find a valid
source address at the time since the source addresses were not set on the
association yet.  Thus resulted in a hung connection.

The solution is to set the source addresses on the association prior to
adding peers.

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>net: Make setsockopt() optlen be unsigned.</title>
<updated>2009-09-30T23:12:20+00:00</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2009-09-30T23:12:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=b7058842c940ad2c08dd829b21e5c92ebe3b8758'/>
<id>b7058842c940ad2c08dd829b21e5c92ebe3b8758</id>
<content type='text'>
This provides safety against negative optlen at the type
level instead of depending upon (sometimes non-trivial)
checks against this sprinkled all over the the place, in
each and every implementation.

Based upon work done by Arjan van de Ven and feedback
from Linus Torvalds.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This provides safety against negative optlen at the type
level instead of depending upon (sometimes non-trivial)
checks against this sprinkled all over the the place, in
each and every implementation.

Based upon work done by Arjan van de Ven and feedback
from Linus Torvalds.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sctp: Fix SCTP_MAXSEG socket option to comply to spec.</title>
<updated>2009-09-04T22:21:00+00:00</updated>
<author>
<name>Vlad Yasevich</name>
<email>vladislav.yasevich@hp.com</email>
</author>
<published>2009-09-04T22:21:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=f68b2e05f326971cd76c65aa91a1a41771dd7485'/>
<id>f68b2e05f326971cd76c65aa91a1a41771dd7485</id>
<content type='text'>
We had a bug that we never stored the user-defined value for
MAXSEG when setting the value on an association.  Thus future
PMTU events ended up re-writing the frag point and increasing
it past user limit.  Additionally, when setting the option on
the socket/endpoint, we effect all current associations, which
is against spec.

Now, we store the user 'maxseg' value along with the computed
'frag_point'.  We inherit 'maxseg' from the socket at association
creation and use it as an upper limit for 'frag_point' when its
set.

Signed-off-by: Vlad Yasevich &lt;vladislav.yasevich@hp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We had a bug that we never stored the user-defined value for
MAXSEG when setting the value on an association.  Thus future
PMTU events ended up re-writing the frag point and increasing
it past user limit.  Additionally, when setting the option on
the socket/endpoint, we effect all current associations, which
is against spec.

Now, we store the user 'maxseg' value along with the computed
'frag_point'.  We inherit 'maxseg' from the socket at association
creation and use it as an upper limit for 'frag_point' when its
set.

Signed-off-by: Vlad Yasevich &lt;vladislav.yasevich@hp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sctp: Send user messages to the lower layer as one</title>
<updated>2009-09-04T22:20:57+00:00</updated>
<author>
<name>Vlad Yasevich</name>
<email>vladislav.yasevich@hp.com</email>
</author>
<published>2009-08-10T17:51:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=9c5c62be2f794c7cee533d856f9f34c3cf21ff1b'/>
<id>9c5c62be2f794c7cee533d856f9f34c3cf21ff1b</id>
<content type='text'>
Currenlty, sctp breaks up user messages into fragments and
sends each fragment to the lower layer by itself.  This means
that for each fragment we go all the way down the stack
and back up.  This also discourages bundling of multiple
fragments when they can fit into a sigle packet (ex: due
to user setting a low fragmentation threashold).

We introduce a new command SCTP_CMD_SND_MSG and hand the
whole message down state machine.  The state machine and
the side-effect parser will cork the queue, add all chunks
from the message to the queue, and then un-cork the queue
thus causing the chunks to get transmitted.

Signed-off-by: Vlad Yasevich &lt;vladislav.yasevich@hp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currenlty, sctp breaks up user messages into fragments and
sends each fragment to the lower layer by itself.  This means
that for each fragment we go all the way down the stack
and back up.  This also discourages bundling of multiple
fragments when they can fit into a sigle packet (ex: due
to user setting a low fragmentation threashold).

We introduce a new command SCTP_CMD_SND_MSG and hand the
whole message down state machine.  The state machine and
the side-effect parser will cork the queue, add all chunks
from the message to the queue, and then un-cork the queue
thus causing the chunks to get transmitted.

Signed-off-by: Vlad Yasevich &lt;vladislav.yasevich@hp.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sctp: Disallow new connection on a closing socket</title>
<updated>2009-09-04T22:20:56+00:00</updated>
<author>
<name>Vlad Yasevich</name>
<email>vladislav.yasevich@hp.com</email>
</author>
<published>2009-07-30T22:08:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=bec9640bb0d451813b1bb1f2cc13a5bfb17c3e48'/>
<id>bec9640bb0d451813b1bb1f2cc13a5bfb17c3e48</id>
<content type='text'>
If a socket has a lot of association that are in the process of
of being closed/aborted, it is possible for a remote to establish
new associations during the time period that the old ones are shutting
down.  If this was a result of a close() call, there will be no socket
and will cause a memory leak.  We'll prevent this by setting the
socket state to CLOSING and disallow new associations when in this state.

Signed-off-by: Vlad Yasevich &lt;vladislav.yasevich@hp.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If a socket has a lot of association that are in the process of
of being closed/aborted, it is possible for a remote to establish
new associations during the time period that the old ones are shutting
down.  If this was a result of a close() call, there will be no socket
and will cause a memory leak.  We'll prevent this by setting the
socket state to CLOSING and disallow new associations when in this state.

Signed-off-by: Vlad Yasevich &lt;vladislav.yasevich@hp.com&gt;
</pre>
</div>
</content>
</entry>
<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>
</feed>
