(I'm so sorry!) Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

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/20250926075053.25615-1-chandna.linuxkernel@gmail.com Signed-off-by: Sahil Chandna <chandna.linuxkernel@gmail.com> Cc: Shuah Khan <shuah@kernel.org> Cc: David Hunter <david.hunter.linux@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>


Author Sahil Chandna Committer Andrew Morton Date Commit Parent cf1bb6b2
+1 -1
1 changed file
+1 -1
1 changed file