tcp: fix SO_RCVLOWAT possible hangs under high mem pressure
authorEric Dumazet <edumazet@google.com>
Tue, 30 Jun 2020 20:51:28 +0000 (13:51 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Jul 2020 07:33:56 +0000 (09:33 +0200)
commit43e3007dbd6c44ee5285ac40a45af8c42da613c0
tree232ea07ec52b4b5ddc7520c617dcfd40ed484c1e
parent38fd50f9c00eabf7fd52c0e6c00ad13362836d3e
tcp: fix SO_RCVLOWAT possible hangs under high mem pressure

[ Upstream commit ba3bb0e76ccd464bb66665a1941fabe55dadb3ba ]

Whenever tcp_try_rmem_schedule() returns an error, we are under
trouble and should make sure to wakeup readers so that they
can drain socket queues and eventually make room.

Fixes: 03f45c883c6f ("tcp: avoid extra wakeups for SO_RCVLOWAT users")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv4/tcp_input.c