Commit d33fe17
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>1 parent be4e130 commit d33fe17
1 file changed
+9
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2896 | 2896 | | |
2897 | 2897 | | |
2898 | 2898 | | |
2899 | | - | |
2900 | | - | |
2901 | 2899 | | |
| 2900 | + | |
| 2901 | + | |
2902 | 2902 | | |
2903 | 2903 | | |
| 2904 | + | |
| 2905 | + | |
| 2906 | + | |
2904 | 2907 | | |
2905 | 2908 | | |
2906 | 2909 | | |
| |||
2910 | 2913 | | |
2911 | 2914 | | |
2912 | 2915 | | |
2913 | | - | |
2914 | | - | |
| 2916 | + | |
| 2917 | + | |
2915 | 2918 | | |
2916 | | - | |
| 2919 | + | |
2917 | 2920 | | |
2918 | 2921 | | |
2919 | 2922 | | |
2920 | 2923 | | |
2921 | 2924 | | |
2922 | 2925 | | |
| 2926 | + | |
2923 | 2927 | | |
2924 | 2928 | | |
2925 | 2929 | | |
| |||
0 commit comments