All of lore.kernel.org
 help / color / mirror / Atom feed
* + lib-genallocc-remove-unmatched-write_lock-in-gen_pool_destroy.patch added to -mm tree
@ 2009-06-15 22:24 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2009-06-15 22:24 UTC (permalink / raw)
  To: mm-commits; +Cc: zygo.blaxell, stable, swise, trivial


The patch titled
     lib/genalloc.c: remove unmatched write_lock() in gen_pool_destroy
has been added to the -mm tree.  Its filename is
     lib-genallocc-remove-unmatched-write_lock-in-gen_pool_destroy.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
out what to do about this

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: lib/genalloc.c: remove unmatched write_lock() in gen_pool_destroy
From: Zygo Blaxell <zygo.blaxell@xandros.com>

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>
---

 lib/genalloc.c |    1 -
 1 file changed, 1 deletion(-)

diff -puN lib/genalloc.c~lib-genallocc-remove-unmatched-write_lock-in-gen_pool_destroy lib/genalloc.c
--- a/lib/genalloc.c~lib-genallocc-remove-unmatched-write_lock-in-gen_pool_destroy
+++ a/lib/genalloc.c
@@ -85,7 +85,6 @@ void gen_pool_destroy(struct gen_pool *p
 	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);
_

Patches currently in -mm which might be from zygo.blaxell@xandros.com are

lib-genallocc-remove-unmatched-write_lock-in-gen_pool_destroy.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-06-15 22:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-15 22:24 + lib-genallocc-remove-unmatched-write_lock-in-gen_pool_destroy.patch added to -mm tree akpm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.