* Jarek Poplawski <[email protected]> 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 <[email protected]>
restore flags in failure branch, pointed out by Jarek Poplawski.
Signed-off-by: Ingo Molnar <[email protected]>
---
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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]