]> www.infradead.org Git - users/dwmw2/linux.git/commit
net: fix sk_wmem_schedule() and sk_rmem_schedule() errors
authorEric Dumazet <edumazet@google.com>
Thu, 9 Jun 2022 06:34:10 +0000 (23:34 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 21 Aug 2022 13:15:40 +0000 (15:15 +0200)
commitd0412d8f693e6f00b6cda80cc3ae1fbc7c14d392
tree33805c5d827834a1393729a2427586b2600c256c
parent0e70bb9cdb0e82ab26a24999c0de81a32c400c72
net: fix sk_wmem_schedule() and sk_rmem_schedule() errors

[ Upstream commit 7c80b038d23e1f4c7fcc311f43f83b8c60e7fb80 ]

If sk->sk_forward_alloc is 150000, and we need to schedule 150001 bytes,
we want to allocate 1 byte more (rounded up to one page),
instead of 150001 :/

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Shakeel Butt <shakeelb@google.com>
Acked-by: Soheil Hassas Yeganeh <soheil@google.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/net/sock.h