aboutsummaryrefslogtreecommitdiffstats
path: root/mm/slab.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/slab.c')
-rw-r--r--mm/slab.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mm/slab.c b/mm/slab.c
index 1e523ed47c61..b80282aef73b 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -3934,7 +3934,7 @@ fail:
3934 3934
3935struct ccupdate_struct { 3935struct ccupdate_struct {
3936 struct kmem_cache *cachep; 3936 struct kmem_cache *cachep;
3937 struct array_cache *new[NR_CPUS]; 3937 struct array_cache *new[0];
3938}; 3938};
3939 3939
3940static void do_ccupdate_local(void *info) 3940static void do_ccupdate_local(void *info)
@@ -3956,7 +3956,8 @@ static int do_tune_cpucache(struct kmem_cache *cachep, int limit,
3956 struct ccupdate_struct *new; 3956 struct ccupdate_struct *new;
3957 int i; 3957 int i;
3958 3958
3959 new = kzalloc(sizeof(*new), gfp); 3959 new = kzalloc(sizeof(*new) + nr_cpu_ids * sizeof(struct array_cache *),
3960 gfp);
3960 if (!new) 3961 if (!new)
3961 return -ENOMEM; 3962 return -ENOMEM;
3962 3963