linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -rt 1/9] preempt rcu: check for underflow
@ 2007-07-30  2:45 Daniel Walker
  2007-07-30  2:45 ` [PATCH -rt 2/9] Dont allow non-threaded softirqs and threaded hardirqs Daniel Walker
                   ` (9 more replies)
  0 siblings, 10 replies; 26+ messages in thread
From: Daniel Walker @ 2007-07-30  2:45 UTC (permalink / raw)
  To: mingo; +Cc: linux-kernel, linux-rt-users

[-- Attachment #1: add-warn-on-rcu-read-unlock-imbalance.patch --]
[-- Type: text/plain, Size: 656 bytes --]

Simple WARN_ON to catch any underflow in rcu_read_lock_nesting.

Signed-off-by: Daniel Walker <dwalker@mvista.com>

---
 kernel/rcupreempt.c |    6 ++++++
 1 file changed, 6 insertions(+)

Index: linux-2.6.22/kernel/rcupreempt.c
===================================================================
--- linux-2.6.22.orig/kernel/rcupreempt.c
+++ linux-2.6.22/kernel/rcupreempt.c
@@ -157,6 +157,12 @@ void __rcu_read_unlock(void)
 	}
 
 	local_irq_restore(oldirq);
+
+	/*
+	 * If our rcu_read_lock_nesting went negative, likely
+	 * something is wrong..
+	 */
+	WARN_ON(current->rcu_read_lock_nesting < 0);
 }
 
 static void __rcu_advance_callbacks(void)

-- 

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2007-08-08 19:46 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-30  2:45 [PATCH -rt 1/9] preempt rcu: check for underflow Daniel Walker
2007-07-30  2:45 ` [PATCH -rt 2/9] Dont allow non-threaded softirqs and threaded hardirqs Daniel Walker
2007-07-30  9:23   ` Ingo Molnar
2007-07-30 11:28     ` Steven Rostedt
2007-07-30  2:45 ` [PATCH -rt 3/9] Fix jiffies wrap issue in update_times Daniel Walker
2007-07-30  9:25   ` Ingo Molnar
2007-07-30  2:45 ` [PATCH -rt 4/9] ifdef raise_softirq_irqoff wakeup Daniel Walker
2007-07-30  9:27   ` Ingo Molnar
2007-07-30 15:48     ` Daniel Walker
2007-08-06  7:20       ` Ingo Molnar
2007-07-30  2:45 ` [PATCH -rt 5/9] net: fix mis-merge in qdisc_restart Daniel Walker
2007-07-30  9:30   ` Ingo Molnar
2007-07-30  2:45 ` [PATCH -rt 6/9] spinlock/rt_lock random cleanups Daniel Walker
2007-07-30  4:58   ` Ankita Garg
2007-07-30 15:48     ` Daniel Walker
2007-07-30  9:31   ` Ingo Molnar
2007-07-30  2:45 ` [PATCH -rt 7/9] introduce PICK_FUNCTION Daniel Walker
2007-07-30  9:39   ` Peter Zijlstra
2007-07-30 16:16     ` Daniel Walker
2007-07-30  2:45 ` [PATCH -rt 8/9] spinlocks/rwlocks: use PICK_FUNCTION() Daniel Walker
2007-07-30  2:45 ` [PATCH -rt 9/9] seqlocks: use PICK_FUNCTION Daniel Walker
2007-08-06  7:21   ` Ingo Molnar
2007-08-08 19:40     ` Daniel Walker
2007-07-30  5:26 ` [PATCH -rt 1/9] preempt rcu: check for underflow Paul E. McKenney
2007-07-30  9:22 ` Ingo Molnar
2007-07-30 15:48   ` Daniel Walker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).