projects
/
linux-2.6-block.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
treewide: Use array_size() in vmalloc()
[linux-2.6-block.git]
/
kernel
/
cgroup
/
cgroup-v1.c
diff --git
a/kernel/cgroup/cgroup-v1.c
b/kernel/cgroup/cgroup-v1.c
index 9b3f9b04f8175d98ea3e24bd57625066310dd7df..8b4f0768efd62244d3939b985059963371e04d63 100644
(file)
--- a/
kernel/cgroup/cgroup-v1.c
+++ b/
kernel/cgroup/cgroup-v1.c
@@
-195,7
+195,7
@@
struct cgroup_pidlist {
static void *pidlist_allocate(int count)
{
if (PIDLIST_TOO_LARGE(count))
- return vmalloc(
count * sizeof(pid_t
));
+ return vmalloc(
array_size(count, sizeof(pid_t)
));
else
return kmalloc_array(count, sizeof(pid_t), GFP_KERNEL);
}