projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
79ea7f4
)
rcuscale: using kcalloc() to relpace kmalloc()
author
Su Hui
<suhui@nfschina.com>
Tue, 22 Apr 2025 01:51:45 +0000
(09:51 +0800)
committer
Joel Fernandes
<joelagnelf@nvidia.com>
Fri, 16 May 2025 13:00:54 +0000
(09:00 -0400)
It's safer to using kcalloc() because it can prevent overflow
problem.
Reviewed-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Su Hui <suhui@nfschina.com>
Signed-off-by: Joel Fernandes <joelagnelf@nvidia.com>
kernel/rcu/rcuscale.c
patch
|
blob
|
blame
|
history
diff --git
a/kernel/rcu/rcuscale.c
b/kernel/rcu/rcuscale.c
index 0f3059b1b80d03ddb8884fa4352e9497f476eecf..b521d04559927a21acc2649d8e8dbbf848dd8a2f 100644
(file)
--- a/
kernel/rcu/rcuscale.c
+++ b/
kernel/rcu/rcuscale.c
@@
-762,7
+762,7
@@
kfree_scale_thread(void *arg)
}
for (i = 0; i < kfree_alloc_num; i++) {
- alloc_ptr = k
malloc(kfree_mult *
sizeof(struct kfree_obj), GFP_KERNEL);
+ alloc_ptr = k
calloc(kfree_mult,
sizeof(struct kfree_obj), GFP_KERNEL);
if (!alloc_ptr)
return -ENOMEM;