Skip to content

Commit

Permalink
lib/genalloc.c: remove unmatched write_lock() in gen_pool_destroy
Browse files Browse the repository at this point in the history
There is a call to write_lock() in gen_pool_destroy which is not balanced
by any corresponding write_unlock().  This causes problems with preemption
because the preemption-disable counter is incremented in the write_lock()
call, but never decremented by any call to write_unlock().  This bug is
gen_pool_destroy, and one of them is non-x86 arch-specific code.

Signed-off-by: Zygo Blaxell <[email protected]>
Cc: Jiri Kosina <[email protected]>
Cc: Steve Wise <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Zygo Blaxell authored and torvalds committed Jun 17, 2009
1 parent 69050ee commit 8e8a2de
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion lib/genalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ void gen_pool_destroy(struct gen_pool *pool)
int bit, end_bit;


write_lock(&pool->lock);
list_for_each_safe(_chunk, _next_chunk, &pool->chunks) {
chunk = list_entry(_chunk, struct gen_pool_chunk, next_chunk);
list_del(&chunk->next_chunk);
Expand Down

0 comments on commit 8e8a2de

Please sign in to comment.