From: Jarek Poplawski <jarkao2@o2.pl>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@elte.hu>
Subject: [PATCH] [ BUG: bad unlock balance detected! ] in 2.6.18-rc5
Date: Fri, 1 Sep 2006 08:43:19 +0200 [thread overview]
Message-ID: <20060901064319.GA2065@ff.dom.local> (raw)
Hi,
Some time ago I wrote about this bug in rc3.
I see it's still in 2.6.18-rc5 so here is what
I've found: with config like this:
CONFIG_SMP=y
CONFIG_PREEMPT=y
CONFIG_LOCKDEP=y
CONFIG_DEBUG_LOCK_ALLOC=y
# CONFIG_PROVE_LOCKING is not set
spin_unlock_irqrestore() goes through lockdep
but spin_lock_irqrestore() doesn't.
I attach my proposal how to fix this.
Jarek P.
diff -Nru linux-2.6.18-rc5-/kernel/spinlock.c linux-2.6.18-rc5/kernel/spinlock.c
--- linux-2.6.18-rc5-/kernel/spinlock.c 2006-08-30 02:20:46.000000000 +0200
+++ linux-2.6.18-rc5/kernel/spinlock.c 2006-09-01 00:27:35.000000000 +0200
@@ -72,7 +72,7 @@
* not re-enabled during lock-acquire (which the preempt-spin-ops do):
*/
#if !defined(CONFIG_PREEMPT) || !defined(CONFIG_SMP) || \
- defined(CONFIG_PROVE_LOCKING)
+ defined(CONFIG_DEBUG_LOCK_ALLOC)
void __lockfunc _read_lock(rwlock_t *lock)
{
next reply other threads:[~2006-09-01 6:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-01 6:43 Jarek Poplawski [this message]
2006-09-01 6:52 ` [PATCH] [ BUG: bad unlock balance detected! ] in 2.6.18-rc5 Jarek Poplawski
2006-09-01 8:46 ` Ingo Molnar
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=20060901064319.GA2065@ff.dom.local \
--to=jarkao2@o2.pl \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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