Simple WARN_ON to catch any underflow in rcu_read_lock_nesting. Signed-off-by: Daniel Walker <[email protected]> --- 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) -- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: [PATCH -rt 1/9] preempt rcu: check for underflow
- From: Ingo Molnar <[email protected]>
- Re: [PATCH -rt 1/9] preempt rcu: check for underflow
- From: "Paul E. McKenney" <[email protected]>
- [PATCH -rt 2/9] Dont allow non-threaded softirqs and threaded hardirqs
- From: Daniel Walker <[email protected]>
- [PATCH -rt 9/9] seqlocks: use PICK_FUNCTION
- From: Daniel Walker <[email protected]>
- [PATCH -rt 8/9] spinlocks/rwlocks: use PICK_FUNCTION()
- From: Daniel Walker <[email protected]>
- [PATCH -rt 7/9] introduce PICK_FUNCTION
- From: Daniel Walker <[email protected]>
- [PATCH -rt 4/9] ifdef raise_softirq_irqoff wakeup
- From: Daniel Walker <[email protected]>
- [PATCH -rt 6/9] spinlock/rt_lock random cleanups
- From: Daniel Walker <[email protected]>
- [PATCH -rt 3/9] Fix jiffies wrap issue in update_times
- From: Daniel Walker <[email protected]>
- [PATCH -rt 5/9] net: fix mis-merge in qdisc_restart
- From: Daniel Walker <[email protected]>
- Re: [PATCH -rt 1/9] preempt rcu: check for underflow
- Prev by Date: [PATCH v3 -mm 9/9] netconsole: Support dynamic reconfiguration using configfs
- Next by Date: [PATCH -rt 5/9] net: fix mis-merge in qdisc_restart
- Previous by thread: [PATCH v3 -mm 0/9] netconsole: Multiple targets and dynamic reconfigurability
- Next by thread: [PATCH -rt 5/9] net: fix mis-merge in qdisc_restart
- Index(es):