[RFC PATCH] arch: patch_text: Fixup last cpu should be master
Max Filippov
jcmvbkbc at gmail.com
Sat Mar 12 15:50:35 PST 2022
Hi Guo Ren,
On Sat, Mar 12, 2022 at 7:56 AM <guoren at kernel.org> wrote:
>
> From: Guo Ren <guoren at linux.alibaba.com>
>
> These patch_text implementations are using stop_machine_cpuslocked
> infrastructure with atomic cpu_count. The origin idea is that when
The original
> the master CPU patch_text, others should wait for it. But current
> implementation is using the first CPU as master, which couldn't
> guarantee continue CPUs are waiting. This patch changes the last
guarantee that remaining CPUs are waiting.
> CPU as the master to solve the potaintial risk.
potential
>
> Signed-off-by: Guo Ren <guoren at linux.alibaba.com>
> Signed-off-by: Guo Ren <guoren at kernel.org>
> Cc: Will Deacon <will at kernel.org>
> Cc: Catalin Marinas <catalin.marinas at arm.com>
> Cc: Palmer Dabbelt <palmer at dabbelt.com>
> Cc: Peter Zijlstra <peterz at infradead.org
> Cc: Masami Hiramatsu <mhiramat at kernel.org>
> Cc: Chris Zankel <chris at zankel.net>
> Cc: Max Filippov <jcmvbkbc at gmail.com>
> Cc: Arnd Bergmann <arnd at arndb.de>
> ---
> arch/arm64/kernel/patching.c | 4 ++--
> arch/csky/kernel/probes/kprobes.c | 2 +-
> arch/riscv/kernel/patch.c | 2 +-
> arch/xtensa/kernel/jump_label.c | 2 +-
> 4 files changed, 5 insertions(+), 5 deletions(-)
Reviewed-by: Max Filippov <jcmvbkbc at gmail.com>
I'm curious, is there a specific issue that prompted this patch?
--
Thanks.
-- Max
More information about the linux-riscv
mailing list