Commit 6281db58 authored by Mathieu Desnoyers's avatar Mathieu Desnoyers Committed by Zheng Zengkai
Browse files

sched/membarrier: fix missing local execution of ipi_sync_rq_state()



stable inclusion
from stable-5.10.24
commit 68b4378d910e1716c91ad288e8683354d282f5fa
bugzilla: 51348

--------------------------------

commit ce29ddc4 upstream.

The function sync_runqueues_membarrier_state() should copy the
membarrier state from the @mm received as parameter to each runqueue
currently running tasks using that mm.

However, the use of smp_call_function_many() skips the current runqueue,
which is unintended. Replace by a call to on_each_cpu_mask().

Fixes: 227a4aad ("sched/membarrier: Fix p->mm->membarrier_state racy load")
Reported-by: default avatarNadav Amit <nadav.amit@gmail.com>
Signed-off-by: default avatarMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
Cc: stable@vger.kernel.org # 5.4.x+
Link: https://lore.kernel.org/r/74F1E842-4A84-47BF-B6C2-5407DFDD4A4A@gmail.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Acked-by: default avatar  Weilong Chen <chenweilong@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent df1a8b56
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment