diff options
author | Paul E. McKenney <paulmck@kernel.org> | 2019-11-27 03:05:45 +0100 |
---|---|---|
committer | Paul E. McKenney <paulmck@kernel.org> | 2020-01-24 19:27:33 +0100 |
commit | 5b14557b073c96a7cf79adc4d7b6c4a8c26b2a43 (patch) | |
tree | 4c4590af8b9c59b6408350d387c5aed3c4e76204 /kernel/rcu/update.c | |
parent | rcu: Provide wrappers for uses of ->rcu_read_lock_nesting (diff) | |
download | linux-5b14557b073c96a7cf79adc4d7b6c4a8c26b2a43.tar.xz linux-5b14557b073c96a7cf79adc4d7b6c4a8c26b2a43.zip |
rcu: Avoid tick_dep_set_cpu() misordering
In the current code, rcu_nmi_enter_common() might decide to turn on
the tick using tick_dep_set_cpu(), but be delayed just before doing so.
Then the grace-period kthread might notice that the CPU in question had
in fact gone through a quiescent state, thus turning off the tick using
tick_dep_clear_cpu(). The later invocation of tick_dep_set_cpu() would
then incorrectly leave the tick on.
This commit therefore enlists the aid of the leaf rcu_node structure's
->lock to ensure that decisions to enable or disable the tick are
carried out before they can be reversed.
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'kernel/rcu/update.c')
0 files changed, 0 insertions, 0 deletions