]> www.infradead.org Git - users/jedix/linux-maple.git/commit
net/dpaa2: Avoid explicit cpumask var allocation on stack
authorDawei Li <dawei.li@shingroup.cn>
Sun, 31 Mar 2024 05:34:41 +0000 (13:34 +0800)
committerJakub Kicinski <kuba@kernel.org>
Wed, 3 Apr 2024 01:19:09 +0000 (18:19 -0700)
commitd33fe1714a44ff540629b149d8fab4ac6967585c
tree8746de2970cc60d555e8a252b814bd8593149378
parentbe4e1304419c99a164b4c0e101c7c2a756b635b9
net/dpaa2: Avoid explicit cpumask var allocation on stack

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: Dawei Li <dawei.li@shingroup.cn>
Link: https://lore.kernel.org/r/20240331053441.1276826-3-dawei.li@shingroup.cn
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c