* [PATCH] [ BUG: bad unlock balance detected! ] in 2.6.18-rc5
@ 2006-09-01 6:43 Jarek Poplawski
2006-09-01 6:52 ` Jarek Poplawski
2006-09-01 8:46 ` Ingo Molnar
0 siblings, 2 replies; 3+ messages in thread
From: Jarek Poplawski @ 2006-09-01 6:43 UTC (permalink / raw)
To: linux-kernel; +Cc: Ingo Molnar
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)
{
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] [ BUG: bad unlock balance detected! ] in 2.6.18-rc5
2006-09-01 6:43 [PATCH] [ BUG: bad unlock balance detected! ] in 2.6.18-rc5 Jarek Poplawski
@ 2006-09-01 6:52 ` Jarek Poplawski
2006-09-01 8:46 ` Ingo Molnar
1 sibling, 0 replies; 3+ messages in thread
From: Jarek Poplawski @ 2006-09-01 6:52 UTC (permalink / raw)
To: linux-kernel; +Cc: Ingo Molnar
On Fri, Sep 01, 2006 at 08:43:19AM +0200, Jarek Poplawski wrote:
...
> spin_unlock_irqrestore() goes through lockdep
> but spin_lock_irqrestore() doesn't.
but spin_lock_irqsave() doesn't!
Jarek P.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] [ BUG: bad unlock balance detected! ] in 2.6.18-rc5
2006-09-01 6:43 [PATCH] [ BUG: bad unlock balance detected! ] in 2.6.18-rc5 Jarek Poplawski
2006-09-01 6:52 ` Jarek Poplawski
@ 2006-09-01 8:46 ` Ingo Molnar
1 sibling, 0 replies; 3+ messages in thread
From: Ingo Molnar @ 2006-09-01 8:46 UTC (permalink / raw)
To: Jarek Poplawski; +Cc: linux-kernel, Arjan van de Ven, Andrew Morton
* Jarek Poplawski <jarkao2@o2.pl> wrote:
> spin_unlock_irqrestore() goes through lockdep but
> spin_lock_irqrestore() doesn't.
good catch! Andrew: i think this is a must-have for 2.6.18.
Acked-by: Ingo Molnar <mingo@elte.hu>
Ingo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-09-01 8:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-01 6:43 [PATCH] [ BUG: bad unlock balance detected! ] in 2.6.18-rc5 Jarek Poplawski
2006-09-01 6:52 ` Jarek Poplawski
2006-09-01 8:46 ` Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox