From: Ingo Molnar <mingo@elte.hu>
To: Jarek Poplawski <jarkao2@o2.pl>, Andrew Morton <akpm@osdl.org>,
linux-kernel@vger.kernel.org
Subject: [patch] lockdep: fix possible race while disabling lock-debugging, restore fix
Date: Mon, 11 Dec 2006 08:28:43 +0100 [thread overview]
Message-ID: <20061211072843.GB31962@elte.hu> (raw)
In-Reply-To: <20061208062725.GA1012@ff.dom.local>
* 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:
prev parent reply other threads:[~2006-12-11 7:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-07 13:29 [patch] lockdep: fix possible races while disabling lock-debugging Ingo Molnar
2006-12-08 6:27 ` Jarek Poplawski
2006-12-11 7:23 ` Ingo Molnar
2006-12-11 7:28 ` Ingo Molnar [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061211072843.GB31962@elte.hu \
--to=mingo@elte.hu \
--cc=akpm@osdl.org \
--cc=jarkao2@o2.pl \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®