diff options
Diffstat (limited to 'mm/vmstat.c')
-rw-r--r-- | mm/vmstat.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mm/vmstat.c b/mm/vmstat.c index a3a5cced5aac..c4d42e27ca9e 100644 --- a/mm/vmstat.c +++ b/mm/vmstat.c @@ -1245,7 +1245,7 @@ static const struct file_operations proc_vmstat_file_operations = { #ifdef CONFIG_SMP static DEFINE_PER_CPU(struct delayed_work, vmstat_work); int sysctl_stat_interval __read_mostly = HZ; -static struct cpumask *cpu_stat_off; +static cpumask_var_t cpu_stat_off; static void vmstat_update(struct work_struct *w) { @@ -1339,7 +1339,8 @@ static void __init start_shepherd_timer(void) INIT_DEFERRABLE_WORK(per_cpu_ptr(&vmstat_work, cpu), vmstat_update); - cpu_stat_off = kmalloc(cpumask_size(), GFP_KERNEL); + if (!alloc_cpumask_var(&cpu_stat_off, GFP_KERNEL)) + BUG(); cpumask_copy(cpu_stat_off, cpu_online_mask); schedule_delayed_work(&shepherd, |