mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
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 <[email protected]> CC: Dipankar Sarma <[email protected]> CC: Paul E. McKenney <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]>
This commit is contained in:
parent
b0a0f667a3
commit
4ee0a60392
1 changed files with 2 additions and 2 deletions
|
|
@ -545,9 +545,9 @@ static void check_cpu_stall(struct rcu_state *rsp, struct rcu_data *rdp)
|
|||
|
||||
if (rcu_cpu_stall_suppress)
|
||||
return;
|
||||
delta = jiffies - rsp->jiffies_stall;
|
||||
delta = jiffies - ACCESS_ONCE(rsp->jiffies_stall);
|
||||
rnp = rdp->mynode;
|
||||
if ((rnp->qsmask & rdp->grpmask) && delta >= 0) {
|
||||
if ((ACCESS_ONCE(rnp->qsmask) & rdp->grpmask) && delta >= 0) {
|
||||
|
||||
/* We haven't checked in, so go dump stack. */
|
||||
print_cpu_stall(rsp);
|
||||
|
|
|
|||
Loading…
Reference in a new issue