Skip to content
Commit 0a632165 authored by Conor Dooley's avatar Conor Dooley Committed by Greg Kroah-Hartman
Browse files

RISC-V: Don't check text_mutex during stop_machine



[ Upstream commit 2a8db5ec ]

We're currently using stop_machine() to update ftrace & kprobes, which
means that the thread that takes text_mutex during may not be the same
as the thread that eventually patches the code.  This isn't actually a
race because the lock is still held (preventing any other concurrent
accesses) and there is only one thread running during stop_machine(),
but it does trigger a lockdep failure.

This patch just elides the lockdep check during stop_machine.

Fixes: c15ac4fd ("riscv/ftrace: Add dynamic function tracer support")
Suggested-by: default avatarSteven Rostedt <rostedt@goodmis.org>
Reported-by: default avatarChangbin Du <changbin.du@gmail.com>
Signed-off-by: default avatarPalmer Dabbelt <palmerdabbelt@google.com>
Signed-off-by: default avatarConor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20230303143754.4005217-1-conor.dooley@microchip.com


Signed-off-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 324912d6
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment