mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 06:25:52 +02:00
Revert "udp: do rmem bulk free even if the rx sk queue is empty"
[ Upstream commitd39ca2590d] This reverts commit0d4a6608f6. Willem reported that after commit0d4a6608f6("udp: do rmem bulk free even if the rx sk queue is empty") the memory allocated by an almost idle system with many UDP sockets can grow a lot. For stable kernel keep the solution as simple as possible and revert the offending commit. Reported-by: Willem de Bruijn <willemdebruijn.kernel@gmail.com> Diagnosed-by: Eric Dumazet <eric.dumazet@gmail.com> Fixes:0d4a6608f6("udp: do rmem bulk free even if the rx sk queue is empty") Signed-off-by: Paolo Abeni <pabeni@redhat.com> Acked-by: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
c74b3d128d
commit
4c1c35c015
|
|
@ -1305,7 +1305,8 @@ static void udp_rmem_release(struct sock *sk, int size, int partial,
|
|||
if (likely(partial)) {
|
||||
up->forward_deficit += size;
|
||||
size = up->forward_deficit;
|
||||
if (size < (sk->sk_rcvbuf >> 2))
|
||||
if (size < (sk->sk_rcvbuf >> 2) &&
|
||||
!skb_queue_empty(&up->reader_queue))
|
||||
return;
|
||||
} else {
|
||||
size += up->forward_deficit;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user