RISC-V: Don't check text_mutex during stop_machine
stable inclusion from stable-v5.10.175 commit ab89b8a67fbbc37c34c2ecb3ed0d7d2ea4bc4c3d category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I8711T Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=ab89b8a67fbbc37c34c2ecb3ed0d7d2ea4bc4c3d -------------------------------- [ 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:Steven Rostedt <rostedt@goodmis.org> Reported-by:
Changbin Du <changbin.du@gmail.com> Signed-off-by:
Palmer Dabbelt <palmerdabbelt@google.com> Signed-off-by:
Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20230303143754.4005217-1-conor.dooley@microchip.com Signed-off-by:
Palmer Dabbelt <palmer@rivosinc.com> Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
sanglipeng <sanglipeng1@jd.com>
Loading
Please sign in to comment