OSDN Git Service

rcu: Protect rcu_check_gp_kthread_starvation() access to ->gp_flags
authorPaul E. McKenney <paulmck@linux.ibm.com>
Wed, 12 Dec 2018 15:20:07 +0000 (07:20 -0800)
committerPaul E. McKenney <paulmck@linux.ibm.com>
Fri, 25 Jan 2019 23:29:58 +0000 (15:29 -0800)
commit3b6505fd8eb86e3ef5ce12b34fe81e9edeb84475
treedf923187ad7bac0b1abbb78ae6983693bf99c074
parentfd897573fa4cfe66ebddf5f4444f36710cf0cad0
rcu: Protect rcu_check_gp_kthread_starvation() access to ->gp_flags

The rcu_check_gp_kthread_starvation() function can be invoked without
holding locks, so the access to the rcu_state structure's ->gp_flags
field must be protected with READ_ONCE().  This commit therefore adds
this protection.

Signed-off-by: Paul E. McKenney <paulmck@linux.ibm.com>
kernel/rcu/tree.c