]> git.baikalelectronics.ru Git - kernel.git/commit
udp: udp_rmem_release() should touch sk_rmem_alloc later
authorEric Dumazet <edumazet@google.com>
Thu, 8 Dec 2016 19:41:57 +0000 (11:41 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 10 Dec 2016 03:12:21 +0000 (22:12 -0500)
commit1fb3db8d923bac52b5587f0179060468105901ec
tree7aea980802490b448bedac089074929b9c47d13b
parent09aa8dd9d87c829ee399214f72e062d9ad8a4bba
udp: udp_rmem_release() should touch sk_rmem_alloc later

In flood situations, keeping sk_rmem_alloc at a high value
prevents producers from touching the socket.

It makes sense to lower sk_rmem_alloc only at the end
of udp_rmem_release() after the thread draining receive
queue in udp_recvmsg() finished the writes to sk_forward_alloc.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/udp.c