]> 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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:23:19 +0000 (14:23 +0200)
commit80d3c6a7a8a37f7f1c225ede3760aaf88d6f0d94
tree7303c53fc048e6f09de42f54db08d875cee7239b
parent80dbc35991338872afb11a7fcf56ba077906b9bd
net: fix sk_wmem_schedule() and sk_rmem_schedule() errors

[ Upstream commit 91efb764f7959c862f629db0991153f86d3c586e ]

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