Commit 94b3f02
kallsyms: use kmalloc_array() instead of kmalloc()
Replace kmalloc(sizeof(*stat) * 2, GFP_KERNEL) with kmalloc_array(2,
sizeof(*stat), GFP_KERNEL) to prevent potential overflow, as recommended
in Documentation/process/deprecated.rst.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Sahil Chandna <[email protected]>
Cc: Shuah Khan <[email protected]>
Cc: David Hunter <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>1 parent cf1bb6b commit 94b3f02
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
267 | | - | |
| 267 | + | |
268 | 268 | | |
269 | 269 | | |
270 | 270 | | |
| |||
0 commit comments