mirror of
https://github.com/torvalds/linux.git
synced 2026-09-13 06:23:02 +02:00
rcu: Mark interrupts-enabled accesses to rdp->cpu_no_qs.s
The rdp->cpu_no_qs.s field is accessed only by the current CPU, but can be accessed both at task level and from interrupt handlers. All accesses from interrupts-enabled code must therefore be marked. This commit therefore converts from __this_cpu_read() to this_cpu_read(), but only in interrupts-enabled code, that is, the rcu_qs() function. KCSAN located this issue. Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
This commit is contained in:
parent
df0ecbc497
commit
76892716e1
|
|
@ -976,7 +976,7 @@ static void __init rcu_bootup_announce(void)
|
|||
static void rcu_qs(void)
|
||||
{
|
||||
RCU_LOCKDEP_WARN(preemptible(), "rcu_qs() invoked with preemption enabled!!!");
|
||||
if (!__this_cpu_read(rcu_data.cpu_no_qs.s))
|
||||
if (!this_cpu_read(rcu_data.cpu_no_qs.s))
|
||||
return;
|
||||
trace_rcu_grace_period(TPS("rcu_sched"),
|
||||
__this_cpu_read(rcu_data.gp_seq), TPS("cpuqs"));
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user