提交 3f04ba85 编写于 作者: T Tejun Heo

vmalloc: fix use of non-existent percpu variable in put_cpu_var()

vmalloc used non-existent percpu variable vmap_cpu_blocks instead of
the intended vmap_block_queue.  This went unnoticed because
put_cpu_var() didn't evaluate the parameter.  Fix it.
Signed-off-by: NTejun Heo <tj@kernel.org>
Cc: Nick Piggin <npiggin@suse.de>
上级 dec54bf5
...@@ -760,7 +760,7 @@ static struct vmap_block *new_vmap_block(gfp_t gfp_mask) ...@@ -760,7 +760,7 @@ static struct vmap_block *new_vmap_block(gfp_t gfp_mask)
spin_lock(&vbq->lock); spin_lock(&vbq->lock);
list_add(&vb->free_list, &vbq->free); list_add(&vb->free_list, &vbq->free);
spin_unlock(&vbq->lock); spin_unlock(&vbq->lock);
put_cpu_var(vmap_cpu_blocks); put_cpu_var(vmap_block_queue);
return vb; return vb;
} }
...@@ -825,7 +825,7 @@ static void *vb_alloc(unsigned long size, gfp_t gfp_mask) ...@@ -825,7 +825,7 @@ static void *vb_alloc(unsigned long size, gfp_t gfp_mask)
} }
spin_unlock(&vb->lock); spin_unlock(&vb->lock);
} }
put_cpu_var(vmap_cpu_blocks); put_cpu_var(vmap_block_queue);
rcu_read_unlock(); rcu_read_unlock();
if (!addr) { if (!addr) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册