diff options
author | Dongdong Deng <dongdong.deng@windriver.com> | 2010-09-28 04:32:43 -0400 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2010-10-07 13:41:06 -0400 |
commit | 4ee0a603926cad973e4d384f48c5e279a0fd4118 (patch) | |
tree | da507192551987d4841fccc541a5b94adfef4f01 /kernel/rcutree.c | |
parent | b0a0f667a349247bd7f05f806b662a25653822bc (diff) |
rcu: using ACCESS_ONCE() to observe the jiffies_stall/rnp->qsmask value
Using ACCESS_ONCE() to observe the jiffies_stall/rnp->qsmask value
due to the caller didn't hold the root_rcu/rnp node's lock. Although
use without ACCESS_ONCE() is safe due to the value loaded being used
but once, the ACCESS_ONCE() is a good documentation aid -- the variables
are being loaded without the services of a lock.
Signed-off-by: Dongdong Deng <dongdong.deng@windriver.com>
CC: Dipankar Sarma <dipankar@in.ibm.com>
CC: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel/rcutree.c')
-rw-r--r-- | kernel/rcutree.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/rcutree.c b/kernel/rcutree.c index e75073504a31..ccdc04c47981 100644 --- a/kernel/rcutree.c +++ b/kernel/rcutree.c | |||
@@ -545,9 +545,9 @@ static void check_cpu_stall(struct rcu_state *rsp, struct rcu_data *rdp) | |||
545 | 545 | ||
546 | if (rcu_cpu_stall_suppress) | 546 | if (rcu_cpu_stall_suppress) |
547 | return; | 547 | return; |
548 | delta = jiffies - rsp->jiffies_stall; | 548 | delta = jiffies - ACCESS_ONCE(rsp->jiffies_stall); |
549 | rnp = rdp->mynode; | 549 | rnp = rdp->mynode; |
550 | if ((rnp->qsmask & rdp->grpmask) && delta >= 0) { | 550 | if ((ACCESS_ONCE(rnp->qsmask) & rdp->grpmask) && delta >= 0) { |
551 | 551 | ||
552 | /* We haven't checked in, so go dump stack. */ | 552 | /* We haven't checked in, so go dump stack. */ |
553 | print_cpu_stall(rsp); | 553 | print_cpu_stall(rsp); |