On Thu, Aug 21, 2025 at 09:41:15PM +0800, Qianfeng Rong wrote: > Replace kzalloc() with kcalloc() in kernel/rcu. As noted in the kernel > documentation [1], open-coded multiplication in allocator arguments is > discouraged because it can lead to integer overflow. > > Use kcalloc() to gain built-in overflow protection, making memory > allocation safer when calculating allocation size compared to explicit > multiplication. > > Link: > https://www.kernel.org/doc/html/next/process/deprecated.html#open-coded-arithmetic-in-allocator-arguments > #1 > Signed-off-by: Qianfeng Rong <rongqianf...@vivo.com>
Queued for review and testing, thank you! Thanx, Paul > Qianfeng Rong (2): > rcutorture: Use kcalloc() instead of kzalloc() > refscale: Use kcalloc() instead of kzalloc() > > kernel/rcu/rcutorture.c | 4 ++-- > kernel/rcu/refscale.c | 2 +- > 2 files changed, 3 insertions(+), 3 deletions(-) > > -- > 2.34.1 >