mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Dave Young <hidave.darkstar@gmail.com>
Cc: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, Zan Lynx <zlynx@acm.org>
Subject: Re: [2.6.24-rc8-mm1] Locking API boot-time self-tests hangs.
Date: Fri, 18 Jan 2008 10:18:10 +0100	[thread overview]
Message-ID: <20080118091810.GG24337@elte.hu> (raw)
In-Reply-To: <a8e1da0801172259s3377895dwb0b2ca1dd781d11b@mail.gmail.com>


* Dave Young <hidave.darkstar@gmail.com> wrote:

> On Jan 18, 2008 2:40 PM, Tetsuo Handa
> <penguin-kernel@i-love.sakura.ne.jp> wrote:
> > Hello.
> >
> > Andrew Morton wrote:
> > > It could be compiler version dependent.  I used gcc-4.1.0.  Which version
> > > were you and Zan using please?
> 
> I have the same problem, gcc 3.4.6

is the patch below already in -rc8-mm1? hmm ... it appears it's not. 
Could you give it a try?

	Ingo

------------->
commit 5a26db5bd25cf4bf32ae9fa9f6136b6b6d5b45c5
Author: Nick Piggin <npiggin@suse.de>
Date:   Wed Jan 16 09:51:58 2008 +0100

    lockdep: fix internal double unlock during self-test
    Lockdep, during self-test (when it was simulating double unlocks) was
    sometimes unconditionally unlocking a spinlock when it had not been
    locked. This won't work for ticket locks.
    
    Signed-off-by: Nick Piggin <npiggin@suse.de>
    Signed-off-by: Ingo Molnar <mingo@elte.hu>
    Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>

diff --git a/kernel/lockdep.c b/kernel/lockdep.c
index 723bd9f..4335f12 100644
--- a/kernel/lockdep.c
+++ b/kernel/lockdep.c
@@ -2943,9 +2943,10 @@ void lockdep_free_key_range(void *start, unsigned long size)
 	struct list_head *head;
 	unsigned long flags;
 	int i;
+	int locked;
 
 	raw_local_irq_save(flags);
-	graph_lock();
+	locked = graph_lock();
 
 	/*
 	 * Unhash all classes that were created by this module:
@@ -2959,7 +2960,8 @@ void lockdep_free_key_range(void *start, unsigned long size)
 				zap_class(class);
 	}
 
-	graph_unlock();
+	if (locked)
+		graph_unlock();
 	raw_local_irq_restore(flags);
 }
 
@@ -2969,6 +2971,7 @@ void lockdep_reset_lock(struct lockdep_map *lock)
 	struct list_head *head;
 	unsigned long flags;
 	int i, j;
+	int locked;
 
 	raw_local_irq_save(flags);
 
@@ -2987,7 +2990,7 @@ void lockdep_reset_lock(struct lockdep_map *lock)
 	 * Debug check: in the end all mapped classes should
 	 * be gone.
 	 */
-	graph_lock();
+	locked = graph_lock();
 	for (i = 0; i < CLASSHASH_SIZE; i++) {
 		head = classhash_table + i;
 		if (list_empty(head))
@@ -3000,7 +3003,8 @@ void lockdep_reset_lock(struct lockdep_map *lock)
 			}
 		}
 	}
-	graph_unlock();
+	if (locked)
+		graph_unlock();
 
 out_restore:
 	raw_local_irq_restore(flags);


  parent reply	other threads:[~2008-01-18  9:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-18  1:20 Tetsuo Handa
2008-01-18  2:19 ` Andrew Morton
2008-01-18  3:19   ` Tetsuo Handa
2008-01-18  4:42     ` Andrew Morton
2008-01-18  6:40       ` Tetsuo Handa
2008-01-18  6:59         ` Dave Young
2008-01-18  8:21           ` Andrew Morton
2008-01-18  8:56             ` Sam Ravnborg
2008-01-18  9:18           ` Ingo Molnar [this message]
2008-01-18  9:38             ` Tetsuo Handa
2008-01-18  9:49               ` Dave Young
2008-01-18  9:19       ` Tetsuo Handa
2008-01-18 16:27       ` Zan Lynx

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=20080118091810.GG24337@elte.hu \
    --to=mingo@elte.hu \
    --cc=akpm@linux-foundation.org \
    --cc=hidave.darkstar@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=penguin-kernel@i-love.sakura.ne.jp \
    --cc=zlynx@acm.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

Powered by JetHome