]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: return early for non-blocking sockets at link congestion
authorParthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com>
Tue, 1 Nov 2016 13:02:34 +0000 (14:02 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 1 Nov 2016 15:53:23 +0000 (11:53 -0400)
commit1047aab58ab811396771b352a690667369526e46
tree74d947199ea10ad77ec946f1d5e69ca5702f1fb3
parentf981c8105787f270412fa855c958ca439eb9ba31
tipc: return early for non-blocking sockets at link congestion

Until now, in stream/mcast send() we pass the message to the link
layer even when the link is congested and add the socket to the
link's wakeup queue. This is unnecessary for non-blocking sockets.
If a socket is set to non-blocking and sends multicast with zero
back off time while receiving EAGAIN, we exhaust the memory.

In this commit, we return immediately at stream/mcast send() for
non-blocking sockets.

Acked-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/socket.c