rcutorture: Use kcalloc() instead of kzalloc()

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

Change sizeof(ulo[0]) and sizeof(rgo[0]) to sizeof(*ulo) and sizeof(*rgo),
as this is more consistent with coding conventions.

Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
This commit is contained in:
Qianfeng Rong 2025-08-21 21:41:16 +08:00 • committed by Paul E. McKenney
commit 3e15cccf3e