diff options
author | Zygo Blaxell <zygo.blaxell@xandros.com> | 2009-06-16 18:33:57 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-16 22:47:53 -0400 |
commit | 8e8a2dea0ca91fe2cb7de7ea212124cfe8c82c35 (patch) | |
tree | 96d07171a5c95e87c69fc18d4d0e582f90095d4e /lib | |
parent | 69050eee8e08a6234f29fe71a56f8c7c7d4d7186 (diff) |
lib/genalloc.c: remove unmatched write_lock() in gen_pool_destroy
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 <zygo.blaxell@xandros.com>
Cc: Jiri Kosina <trivial@kernel.org>
Cc: Steve Wise <swise@opengridcomputing.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/genalloc.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/lib/genalloc.c b/lib/genalloc.c index f6d276db2d58..eed2bdb865e7 100644 --- a/lib/genalloc.c +++ b/lib/genalloc.c | |||
@@ -85,7 +85,6 @@ void gen_pool_destroy(struct gen_pool *pool) | |||
85 | int bit, end_bit; | 85 | int bit, end_bit; |
86 | 86 | ||
87 | 87 | ||
88 | write_lock(&pool->lock); | ||
89 | list_for_each_safe(_chunk, _next_chunk, &pool->chunks) { | 88 | list_for_each_safe(_chunk, _next_chunk, &pool->chunks) { |
90 | chunk = list_entry(_chunk, struct gen_pool_chunk, next_chunk); | 89 | chunk = list_entry(_chunk, struct gen_pool_chunk, next_chunk); |
91 | list_del(&chunk->next_chunk); | 90 | list_del(&chunk->next_chunk); |