Commit a481e641 authored by Dawei Li's avatar Dawei Li Committed by Zhang Changzhong
Browse files

net/iucv: Avoid explicit cpumask var allocation on stack

stable inclusion
from stable-v4.19.317
commit 2b085521be5292016097b5e7ca81b26be3f7098d
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/IAGEP9
CVE: CVE-2024-42094

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



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

[ Upstream commit be4e1304419c99a164b4c0e101c7c2a756b635b9 ]

For CONFIG_CPUMASK_OFFSTACK=y kernel, explicit allocation of cpumask
variable on stack is not recommended since it can cause potential stack
overflow.

Instead, kernel code should always use *cpumask_var API(s) to allocate
cpumask var in config-neutral way, leaving allocation strategy to
CONFIG_CPUMASK_OFFSTACK.

Use *cpumask_var API(s) to address it.

Signed-off-by: default avatarDawei Li <dawei.li@shingroup.cn>
Reviewed-by: default avatarAlexandra Winter <wintera@linux.ibm.com>
Link: https://lore.kernel.org/r/20240331053441.1276826-2-dawei.li@shingroup.cn


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarZhang Changzhong <zhangchangzhong@huawei.com>
parent f10f25f5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment