]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
sched/membarrier: fix missing local execution of ipi_sync_rq_state()
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 17 Feb 2021 16:56:51 +0000 (11:56 -0500)
committerSeth Forshee <seth.forshee@canonical.com>
Wed, 17 Mar 2021 18:49:02 +0000 (13:49 -0500)
commitffe57d54052488e9d9edf7f766c5295f25dabd9f
treec12796a04aad9af61d2ccd2c39580e9779a054d4
parentaf497507f360983705cfcf7315530c95b0a77e61
sched/membarrier: fix missing local execution of ipi_sync_rq_state()

BugLink: https://bugs.launchpad.net/bugs/1919492
commit ce29ddc47b91f97e7f69a0fb7cbb5845f52a9825 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: 227a4aadc75b ("sched/membarrier: Fix p->mm->membarrier_state racy load")
Reported-by: Nadav Amit <nadav.amit@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo 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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
kernel/sched/membarrier.c