]> git.baikalelectronics.ru Git - kernel.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)
committerJakub Kicinski <kuba@kernel.org>
Fri, 10 Jun 2022 23:21:27 +0000 (16:21 -0700)
commit91efb764f7959c862f629db0991153f86d3c586e
treec4a0d2b50d45d29cc48dc3b65cf69c147be04c0e
parent4f0f539e7ab03fcf80b73eb8539ef11fa5f5dcac
net: fix sk_wmem_schedule() and sk_rmem_schedule() errors

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>
include/net/sock.h