]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: fix over estimation in sk_forced_mem_schedule()
authorEric Dumazet <edumazet@google.com>
Tue, 14 Jun 2022 17:17:33 +0000 (10:17 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Aug 2022 09:18:17 +0000 (11:18 +0200)
commitb8c782f28d759872306da4d26a9701c12ae75df4
tree6759a13bae0d45e386dcfdc8cb57feb3e2d9907b
parente7186f111d5fa75fc2ab7b6a3d4ddeb6bfec6e03
tcp: fix over estimation in sk_forced_mem_schedule()

commit 922ec70e68e84a85d1e91653aa9354675f58379d upstream.

sk_forced_mem_schedule() has a bug similar to ones fixed
in commit 91efb764f795 ("net: fix sk_wmem_schedule() and
sk_rmem_schedule() errors")

While this bug has little chance to trigger in old kernels,
we need to fix it before the following patch.

Fixes: 5d35369de88a ("tcp: fix possible deadlock in tcp_send_fin()")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Soheil Hassas Yeganeh <soheil@google.com>
Reviewed-by: Shakeel Butt <shakeelb@google.com>
Reviewed-by: Wei Wang <weiwan@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv4/tcp_output.c