linux/kernel/rcu
Lai Jiangshan 79a62f957e rcu: Warn on allegedly impossible rcu_read_unlock_special() from irq
After commit #10f39bb1b2c1 (rcu: protect __rcu_read_unlock() against
scheduler-using irq handlers), it is no longer possible to enter
the main body of rcu_read_lock_special() from an NMI, interrupt, or
softirq handler.  In theory, this implies that the check for "in_irq()
|| in_serving_softirq()" must always fail, so that in theory this check
could be removed entirely.

In practice, this commit wraps this condition with a WARN_ON_ONCE().
If this warning never triggers, then the condition will be removed
entirely.

[ paulmck: And one way of triggering the WARN_ON() is if a scheduling
  clock interrupt occurs in an RCU read-side critical section, setting
  RCU_READ_UNLOCK_NEED_QS, which is handled by rcu_read_unlock_special().
  Updated this commit to return if only that bit was set. ]

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
2013-12-12 12:34:00 -08:00
..
Makefile
rcu.h rcu: Provide better diagnostics for blocking in RCU callback functions 2013-12-09 15:12:39 -08:00
srcu.c rcu: Improve SRCU's grace-period comments 2013-12-09 15:12:38 -08:00
tiny.c This batch of changes is mostly clean ups and small bug fixes. 2013-11-16 12:23:18 -08:00
tiny_plugin.h
torture.c rcu: Fix and comment ordering around wait_event() 2013-12-03 10:10:18 -08:00
tree.c rcu: Fix CONFIG_RCU_FANOUT_EXACT for odd fanout/leaf values 2013-12-09 15:12:38 -08:00
tree.h rcu: Break call_rcu() deadlock involving scheduler and perf 2013-12-03 10:10:18 -08:00
tree_plugin.h rcu: Warn on allegedly impossible rcu_read_unlock_special() from irq 2013-12-12 12:34:00 -08:00
tree_trace.c rcu: Break call_rcu() deadlock involving scheduler and perf 2013-12-03 10:10:18 -08:00
update.c rcu: Provide better diagnostics for blocking in RCU callback functions 2013-12-09 15:12:39 -08:00