Commit 4d322521 authored by Eric Dumazet's avatar Eric Dumazet Committed by Zheng Zengkai
Browse files

net: fix sk_wmem_schedule() and sk_rmem_schedule() errors

stable inclusion
from stable-v5.10.137
commit d0412d8f693e6f00b6cda80cc3ae1fbc7c14d392
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5NYY0?from=project-issue
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=d0412d8f693e6f00b6cda80cc3ae1fbc7c14d392



--------------------------------

[ Upstream commit 7c80b038 ]

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: 1da177e4 ("Linux-2.6.12-rc2")
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Reviewed-by: default avatarShakeel Butt <shakeelb@google.com>
Acked-by: default avatarSoheil Hassas Yeganeh <soheil@google.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarZiyang Xuan <william.xuanziyang@huawei.com>
Reviewed-by: default avatarYue Haibing <yuehaibing@huawei.com>
Reviewed-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent c890eab9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment