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:31:59 +0000 (09:31 +0200)
commit721e5f54af0dbe1cdee6ce3d5fc8b6abe36f3e43
treeca8122ed92c9e88e28557677c99cba96577b7e8a
parentaedd1023b6747b7eb0c4add6d20f421f93a9890a
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