]> Gentwo Git Trees - linux/.git/commit
refscale: Use kcalloc() instead of kzalloc()
authorQianfeng Rong <rongqianfeng@vivo.com>
Thu, 21 Aug 2025 13:41:17 +0000 (21:41 +0800)
committerPaul E. McKenney <paulmck@kernel.org>
Fri, 22 Aug 2025 13:26:22 +0000 (06:26 -0700)
commit9a0352dd45225597cb8d4a4d79cf5b53f3609ae3
tree3c38e0c0b801e84468b1d4c6bec7fb7fab49505d
parent3e15cccf3ea272ae40942e8a5a741bb69a56f654
refscale: Use kcalloc() instead of kzalloc()

Use kcalloc() in main_func() to gain built-in overflow protection, making
memory allocation safer when calculating allocation size compared to
explicit multiplication.

Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
kernel/rcu/refscale.c