Skip to content

Commit

Permalink
vmalloc: fix use of non-existent percpu variable in put_cpu_var()
Browse files Browse the repository at this point in the history
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: Tejun Heo <tj@kernel.org>
Cc: Nick Piggin <npiggin@suse.de>
  • Loading branch information
htejun committed Oct 29, 2009
1 parent dec54bf commit 3f04ba8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mm/vmalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@ static struct vmap_block *new_vmap_block(gfp_t gfp_mask)
spin_lock(&vbq->lock);
list_add(&vb->free_list, &vbq->free);
spin_unlock(&vbq->lock);
put_cpu_var(vmap_cpu_blocks);
put_cpu_var(vmap_block_queue);

return vb;
}
Expand Down Expand Up @@ -825,7 +825,7 @@ static void *vb_alloc(unsigned long size, gfp_t gfp_mask)
}
spin_unlock(&vb->lock);
}
put_cpu_var(vmap_cpu_blocks);
put_cpu_var(vmap_block_queue);
rcu_read_unlock();

if (!addr) {
Expand Down

0 comments on commit 3f04ba8

Please sign in to comment.