<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lwn.git/net/rds/send.c, branch 4.4-additional</title>
<subtitle>Linux kernel documentation tree maintained by Jonathan Corbet</subtitle>
<id>http://mirrors.hust.edu.cn/git/lwn.git/atom?h=4.4-additional</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/lwn.git/atom?h=4.4-additional'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/'/>
<updated>2015-08-25T20:35:31+00:00</updated>
<entry>
<title>RDS: return EMSGSIZE for oversize requests before processing/queueing</title>
<updated>2015-08-25T20:35:31+00:00</updated>
<author>
<name>Mukesh Kacker</name>
<email>mukesh.kacker@oracle.com</email>
</author>
<published>2015-08-22T22:45:34+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=06e8941e22f5cbaa4051f06d7ac99e3f302f6d48'/>
<id>urn:sha1:06e8941e22f5cbaa4051f06d7ac99e3f302f6d48</id>
<content type='text'>
rds_send_queue_rm() allows for the "current datagram" being queued
to exceed SO_SNDBUF thresholds by checking bytes queued without
counting in length of current datagram. (Since sk_sndbuf is set
to twice requested SO_SNDBUF value as a kernel heuristic this
is usually fine!)

If this "current datagram" squeezing past the threshold is itself
many times the size of the sk_sndbuf threshold itself then even
twice the SO_SNDBUF does not save us and it gets queued but
cannot be transmitted. Threads block and deadlock and device
becomes unusable. The check for this datagram not exceeding
SNDBUF thresholds (EMSGSIZE) is not done on this datagram as
that check is only done if queueing attempt fails.
(Datagrams that follow this datagram fail queueing attempts, go
through the check and eventually trip EMSGSIZE error but zero
length datagrams silently fail!)

This fix moves the check for datagrams exceeding SNDBUF limits
before any processing or queueing is attempted and returns EMSGSIZE
early in the rds_sndmsg() code. This change also ensures that all
datagrams get checked for exceeding SNDBUF/sk_sndbuf size limits
and the large datagrams that exceed those limits do not get to
rds_send_queue_rm() code for processing.

Signed-off-by: Mukesh Kacker &lt;mukesh.kacker@oracle.com&gt;
Signed-off-by: Santosh Shilimkar &lt;ssantosh@kernel.org&gt;
Signed-off-by: Santosh Shilimkar &lt;santosh.shilimkar@oracle.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>RDS: make sure rds_send_drop_to properly takes the m_rs_lock</title>
<updated>2015-08-25T20:35:31+00:00</updated>
<author>
<name>santosh.shilimkar@oracle.com</name>
<email>santosh.shilimkar@oracle.com</email>
</author>
<published>2015-08-22T22:45:33+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=dfcec251d22bab947d10cf37e9ad67085cf7f097'/>
<id>urn:sha1:dfcec251d22bab947d10cf37e9ad67085cf7f097</id>
<content type='text'>
rds_send_drop_to() is used during socket tear down to find all the
messages on the socket and flush them .  It can race with the
acking code unless it takes the m_rs_lock on each and every message.

This plugs a hole where we didn't take m_rs_lock on any message that
didn't have the RDS_MSG_ON_CONN set.  Taking m_rs_lock avoids
double frees and other memory corruptions as the ack code trusts
the message m_rs pointer on a socket that had actually been freed.

We must take m_rs_lock to access m_rs.  Because of lock nesting and
rs access, we also need to acquire rs_lock.

Reviewed-by: Ajaykumar Hotchandani &lt;ajaykumar.hotchandani@oracle.com&gt;
Signed-off-by: Santosh Shilimkar &lt;ssantosh@kernel.org&gt;
Signed-off-by: Santosh Shilimkar &lt;santosh.shilimkar@oracle.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>RDS: Mark message mapped before transmit</title>
<updated>2015-08-25T20:35:30+00:00</updated>
<author>
<name>santosh.shilimkar@oracle.com</name>
<email>santosh.shilimkar@oracle.com</email>
</author>
<published>2015-08-22T22:45:29+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=4f73113c63bae5cd092c93c2a9835b9d3c7f0b54'/>
<id>urn:sha1:4f73113c63bae5cd092c93c2a9835b9d3c7f0b54</id>
<content type='text'>
rds_send_xmit() marks the rds message map flag after
xmit_[rdma/atomic]() which is clearly wrong.  We need
to maintain the ownership between transport and rds.

Also take care of error path.

Reviewed-by: Ajaykumar Hotchandani &lt;ajaykumar.hotchandani@oracle.com&gt;
Signed-off-by: Santosh Shilimkar &lt;ssantosh@kernel.org&gt;
Signed-off-by: Santosh Shilimkar &lt;santosh.shilimkar@oracle.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>RDS: check for congestion updates during rds_send_xmit</title>
<updated>2015-08-25T20:35:30+00:00</updated>
<author>
<name>santosh.shilimkar@oracle.com</name>
<email>santosh.shilimkar@oracle.com</email>
</author>
<published>2015-08-22T22:45:27+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=0c484240210a8c835a216dbca6f1d690e4094a7c'/>
<id>urn:sha1:0c484240210a8c835a216dbca6f1d690e4094a7c</id>
<content type='text'>
Ensure we don't keep sending the data if the link is congested.

Reviewed-by: Ajaykumar Hotchandani &lt;ajaykumar.hotchandani@oracle.com&gt;
Signed-off-by: Santosh Shilimkar &lt;ssantosh@kernel.org&gt;
Signed-off-by: Santosh Shilimkar &lt;santosh.shilimkar@oracle.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>RDS-TCP: Make RDS-TCP work correctly when it is set up in a netns other than init_net</title>
<updated>2015-08-07T18:29:57+00:00</updated>
<author>
<name>Sowmini Varadhan</name>
<email>sowmini.varadhan@oracle.com</email>
</author>
<published>2015-08-05T05:43:25+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=d5a8ac28a7ff2f250d1bedbb6008dd2f6f6f1638'/>
<id>urn:sha1:d5a8ac28a7ff2f250d1bedbb6008dd2f6f6f1638</id>
<content type='text'>
Open the sockets calling sock_create_kern() with the correct struct net
pointer, and use that struct net pointer when verifying the
address passed to rds_bind().

Signed-off-by: Sowmini Varadhan &lt;sowmini.varadhan@oracle.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net</title>
<updated>2015-04-14T19:44:14+00:00</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2015-04-14T19:44:14+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=87ffabb1f055e14e7d171c6599539a154d647904'/>
<id>urn:sha1:87ffabb1f055e14e7d171c6599539a154d647904</id>
<content type='text'>
The dwmac-socfpga.c conflict was a case of a bug fix overlapping
changes in net-next to handle an error pointer differently.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>RDS: make sure not to loop forever inside rds_send_xmit</title>
<updated>2015-04-08T19:17:32+00:00</updated>
<author>
<name>Sowmini Varadhan</name>
<email>sowmini.varadhan@oracle.com</email>
</author>
<published>2015-04-08T16:33:47+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=443be0e5affe3acb6dd81e7402951677e0a0eb35'/>
<id>urn:sha1:443be0e5affe3acb6dd81e7402951677e0a0eb35</id>
<content type='text'>
If a determined set of concurrent senders keep the send queue full,
we can loop forever inside rds_send_xmit.  This fix has two parts.

First we are dropping out of the while(1) loop after we've processed a
large batch of messages.

Second we add a generation number that gets bumped each time the
xmit bit lock is acquired.  If someone else has jumped in and
made progress in the queue, we skip our goto restart.

Original patch by Chris Mason.

Signed-off-by: Sowmini Varadhan &lt;sowmini.varadhan@oracle.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: Remove iocb argument from sendmsg and recvmsg</title>
<updated>2015-03-02T18:06:31+00:00</updated>
<author>
<name>Ying Xue</name>
<email>ying.xue@windriver.com</email>
</author>
<published>2015-03-02T07:37:48+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=1b784140474e4fc94281a49e96c67d29df0efbde'/>
<id>urn:sha1:1b784140474e4fc94281a49e96c67d29df0efbde</id>
<content type='text'>
After TIPC doesn't depend on iocb argument in its internal
implementations of sendmsg() and recvmsg() hooks defined in proto
structure, no any user is using iocb argument in them at all now.
Then we can drop the redundant iocb argument completely from kinds of
implementations of both sendmsg() and recvmsg() in the entire
networking stack.

Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Suggested-by: Al Viro &lt;viro@ZenIV.linux.org.uk&gt;
Signed-off-by: Ying Xue &lt;ying.xue@windriver.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: introduce helper macro for_each_cmsghdr</title>
<updated>2014-12-11T03:41:55+00:00</updated>
<author>
<name>Gu Zheng</name>
<email>guz.fnst@cn.fujitsu.com</email>
</author>
<published>2014-12-11T03:22:04+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=f95b414edb18de59940dcebbefb49cf25c6d505c'/>
<id>urn:sha1:f95b414edb18de59940dcebbefb49cf25c6d505c</id>
<content type='text'>
Introduce helper macro for_each_cmsghdr as a wrapper of the enumerating
cmsghdr from msghdr, just cleanup.

Signed-off-by: Gu Zheng &lt;guz.fnst@cn.fujitsu.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>put iov_iter into msghdr</title>
<updated>2014-12-09T21:29:03+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2014-11-24T15:42:55+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=c0371da6047abd261bc483c744dbc7d81a116172'/>
<id>urn:sha1:c0371da6047abd261bc483c744dbc7d81a116172</id>
<content type='text'>
Note that the code _using_ -&gt;msg_iter at that point will be very
unhappy with anything other than unshifted iovec-backed iov_iter.
We still need to convert users to proper primitives.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
</feed>
