]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: make tcp_read_sock() more robust
authorEric Dumazet <edumazet@google.com>
Wed, 2 Mar 2022 16:17:23 +0000 (08:17 -0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 3 Mar 2022 06:49:03 +0000 (22:49 -0800)
commitb9c40e8c4d523443401847a1ba4e765a83e6080d
tree361ec8c7f3966ec8bf73cf545132efb58aaa730f
parent08b6026a0e2c0ff7c3c90799dc6360c307f71da2
tcp: make tcp_read_sock() more robust

If recv_actor() returns an incorrect value, tcp_read_sock()
might loop forever.

Instead, issue a one time warning and make sure to make progress.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Acked-by: Jakub Sitnicki <jakub@cloudflare.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/r/20220302161723.3910001-2-eric.dumazet@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv4/tcp.c