summaryrefslogtreecommitdiff
path: root/rust/helpers/helpers.c
diff options
context:
space:
mode:
authorQianfeng Rong <rongqianfeng@vivo.com>2025-08-21 21:41:16 +0800
committerPaul E. McKenney <paulmck@kernel.org>2025-08-22 06:26:22 -0700
commit3e15cccf3ea272ae40942e8a5a741bb69a56f654 (patch)
treec11c9d20de2eb48a5b55c6558de3143cc3f50ce9 /rust/helpers/helpers.c
parent51c285baa3fa04b95843da8e2f9895138ea64dd4 (diff)
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>
Diffstat (limited to 'rust/helpers/helpers.c')
0 files changed, 0 insertions, 0 deletions