diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2015-01-21 18:26:03 -0500 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2015-03-03 14:16:00 -0500 |
commit | d24209bb689e2c7f7418faec9b4a948e922d24da (patch) | |
tree | 40db37902a30acb68f5733e666f25ea7b52e8485 /include/linux/rcupdate.h | |
parent | 6629240575992a6f0d18c46f5160b34527b0e501 (diff) |
rcu: Improve diagnostics for blocked critical sections in irq
If an RCU read-side critical section occurs within an interrupt handler
or a softirq handler, it cannot have been preempted. Therefore, there is
a check in rcu_read_unlock_special() checking for this error. However,
when this check triggers, it lacks diagnostic information. This commit
therefore moves rcu_read_unlock()'s lockdep annotation to follow the
call to __rcu_read_unlock() and changes rcu_read_unlock_special()'s
WARN_ON_ONCE() to an lockdep_rcu_suspicious() in order to locate where
the offending RCU read-side critical section began. In addition, the
value of the ->rcu_read_unlock_special field is printed.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'include/linux/rcupdate.h')
-rw-r--r-- | include/linux/rcupdate.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 3e6afed51051..70b896e16f19 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
@@ -942,9 +942,9 @@ static inline void rcu_read_unlock(void) | |||
942 | { | 942 | { |
943 | rcu_lockdep_assert(rcu_is_watching(), | 943 | rcu_lockdep_assert(rcu_is_watching(), |
944 | "rcu_read_unlock() used illegally while idle"); | 944 | "rcu_read_unlock() used illegally while idle"); |
945 | rcu_lock_release(&rcu_lock_map); | ||
946 | __release(RCU); | 945 | __release(RCU); |
947 | __rcu_read_unlock(); | 946 | __rcu_read_unlock(); |
947 | rcu_lock_release(&rcu_lock_map); /* Keep acq info for rls diags. */ | ||
948 | } | 948 | } |
949 | 949 | ||
950 | /** | 950 | /** |