1
0
Fork 0
remarkable-linux/kernel/rcu
Paul E. McKenney a6556a506e rcu: Correctly handle non-empty Tiny RCU callback list with none ready
commit 6e91f8cb13 upstream.

If, at the time __rcu_process_callbacks() is invoked,  there are callbacks
in Tiny RCU's callback list, but none of them are ready to be invoked,
the current list-management code will knit the non-ready callbacks out
of the list.  This can result in hangs and possibly worse.  This commit
therefore inserts a check for there being no callbacks that can be
invoked immediately.

This bug is unlikely to occur -- you have to get a new callback between
the time rcu_sched_qs() or rcu_bh_qs() was called, but before we get to
__rcu_process_callbacks().  It was detected by the addition of RCU-bh
testing to rcutorture, which in turn was instigated by Iftekhar Ahmed's
mutation testing.  Although this bug was made much more likely by
915e8a4fe4 (rcu: Remove fastpath from __rcu_process_callbacks()), this
did not cause the bug, but rather made it much more probable.   That
said, it takes more than 40 hours of rcutorture testing, on average,
for this bug to appear, so this fix cannot be considered an emergency.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-21 10:10:01 -07:00
..
Makefile rcu: Make SRCU optional by using CONFIG_SRCU 2015-01-06 11:04:29 -08:00
rcu.h tiny_rcu: Directly force QS when call_rcu_[bh|sched]() on idle_task 2015-01-06 11:01:12 -08:00
rcutorture.c rcutorture: Make consistent use of variables 2015-02-26 12:03:04 -08:00
srcu.c Merge branches 'doc.2015.02.26a', 'earlycb.2015.03.03a', 'fixes.2015.03.03a', 'gpexp.2015.02.26a', 'hotplug.2015.03.20a', 'sysidle.2015.02.26b' and 'tiny.2015.02.26a' into HEAD 2015-03-20 08:31:01 -07:00
tiny.c rcu: Correctly handle non-empty Tiny RCU callback list with none ready 2015-07-21 10:10:01 -07:00
tiny_plugin.h Merge branches 'doc.2015.01.07a', 'fixes.2015.01.15a', 'preempt.2015.01.06a', 'srcu.2015.01.06a', 'stall.2015.01.16a' and 'torture.2015.01.11a' into HEAD 2015-01-15 23:34:34 -08:00
tree.c rcu: Control grace-period delays directly from value 2015-04-14 19:33:59 -07:00
tree.h rcu: Eliminate ->onoff_mutex from rcu_node structure 2015-03-12 15:19:37 -07:00
tree_plugin.h Merge branches 'doc.2015.02.26a', 'earlycb.2015.03.03a', 'fixes.2015.03.03a', 'gpexp.2015.02.26a', 'hotplug.2015.03.20a', 'sysidle.2015.02.26b' and 'tiny.2015.02.26a' into HEAD 2015-03-20 08:31:01 -07:00
tree_trace.c rcu: Process offlining and onlining only at grace-period start 2015-03-12 15:19:37 -07:00
update.c Merge branches 'doc.2015.02.26a', 'earlycb.2015.03.03a', 'fixes.2015.03.03a', 'gpexp.2015.02.26a', 'hotplug.2015.03.20a', 'sysidle.2015.02.26b' and 'tiny.2015.02.26a' into HEAD 2015-03-20 08:31:01 -07:00