Messages in this thread Patch in this message | | | Date | Mon, 11 Dec 2006 08:28:43 +0100 | From | Ingo Molnar <> | Subject | [patch] lockdep: fix possible race while disabling lock-debugging, restore fix |
| |
* Jarek Poplawski <jarkao2@o2.pl> wrote:
> ... > > @@ -1212,7 +1244,8 @@ register_lock_class(struct lockdep_map * > > hash_head = classhashentry(key); > > > > raw_local_irq_save(flags); > > - __raw_spin_lock(&hash_lock); > > + if (!graph_lock()) > > ! raw_local_irq_restore(flags); > > > + return NULL;
yeah. Fix below.
Ingo
Subject: [patch] lockdep: fix possible race while disabling lock-debugging, restore fix From: Ingo Molnar <mingo@elte.hu>
restore flags in failure branch, pointed out by Jarek Poplawski.
Signed-off-by: Ingo Molnar <mingo@elte.hu> --- kernel/lockdep.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
Index: linux/kernel/lockdep.c =================================================================== --- linux.orig/kernel/lockdep.c +++ linux/kernel/lockdep.c @@ -1244,8 +1244,10 @@ register_lock_class(struct lockdep_map * hash_head = classhashentry(key); raw_local_irq_save(flags); - if (!graph_lock()) + if (!graph_lock()) { + raw_local_irq_restore(flags); return NULL; + } /* * We have to do the hash-walk again, to avoid races * with another CPU: - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |