Skip to content

Commit 73956fc

Browse files
Peter ZijlstraIngo Molnar
authored andcommitted
membarrier: Fix RCU locking bug caused by faulty merge
The following commit: 227a4aa ("sched/membarrier: Fix p->mm->membarrier_state racy load") got fat fingered by me when merging it with other patches. It meant to move the RCU section out of the for loop but ended up doing it partially, leaving a superfluous rcu_read_lock() inside, causing havok. Reported-by: Ingo Molnar <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: Chris Metcalf <[email protected]> Cc: Christoph Lameter <[email protected]> Cc: Eric W. Biederman <[email protected]> Cc: Kirill Tkhai <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Mathieu Desnoyers <[email protected]> Cc: Mike Galbraith <[email protected]> Cc: Oleg Nesterov <[email protected]> Cc: Paul E. McKenney <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Russell King - ARM Linux admin <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: [email protected] Fixes: 227a4aa ("sched/membarrier: Fix p->mm->membarrier_state racy load") Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
1 parent 54ecb8f commit 73956fc

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

kernel/sched/membarrier.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,6 @@ static int membarrier_private_expedited(int flags)
174174
*/
175175
if (cpu == raw_smp_processor_id())
176176
continue;
177-
rcu_read_lock();
178177
p = rcu_dereference(cpu_rq(cpu)->curr);
179178
if (p && p->mm == mm)
180179
__cpumask_set_cpu(cpu, tmpmask);

0 commit comments

Comments
 (0)