WSL2-Linux-Kernel/arch/riscv/kernel
Conor Dooley 2a8db5ec4a
RISC-V: Don't check text_mutex during stop_machine
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: c15ac4fd60 ("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>
2023-03-09 14:58:51 -08:00
..
compat_vdso RISC-V: Stop emitting attributes 2023-03-06 15:55:25 -08:00
probes RISC-V Patches for the 6.3 Merge Window, Part 1 2023-02-25 11:14:08 -08:00
vdso riscv: alternative: patch alternatives in the vDSO 2023-01-31 23:29:42 -08:00
.gitignore
Makefile
alternative.c riscv: alternative: proceed one more instruction for auipc/jalr pair 2023-02-21 17:21:50 -08:00
asm-offsets.c
cacheinfo.c arch_topology: Build cacheinfo from primary CPU 2023-01-18 09:58:40 +00:00
compat_signal.c
compat_syscall_table.c
cpu-hotplug.c
cpu.c RISC-V: fix ordering of Zbb extension 2023-02-21 17:21:21 -08:00
cpu_ops.c
cpu_ops_sbi.c
cpu_ops_spinwait.c
cpufeature.c RISC-V: take text_mutex during alternative patching 2023-02-21 17:21:33 -08:00
crash_core.c
crash_dump.c
crash_save_regs.S
efi-header.S
efi.c efi: Discover BTI support in runtime services regions 2023-02-04 09:19:02 +01:00
elf_kexec.c
entry.S
fpu.S
ftrace.c RISC-V: Don't check text_mutex during stop_machine 2023-03-09 14:58:51 -08:00
head.S riscv: fix -Wundef warning for CONFIG_RISCV_BOOT_SPINWAIT 2023-01-19 16:37:11 -08:00
head.h
image-vars.h
irq.c
jump_label.c
kexec_relocate.S
kgdb.c RISC-V: rename parse_asm.h to insn.h 2022-12-29 06:59:47 -08:00
machine_kexec.c
machine_kexec_file.c
mcount-dyn.S riscv: ftrace: Reduce the detour code size to half 2023-02-15 10:58:21 -08:00
mcount.S
module-sections.c
module.c riscv: module: Add ADD16 and SUB16 rela types 2023-01-31 23:29:40 -08:00
patch.c RISC-V: Don't check text_mutex during stop_machine 2023-03-09 14:58:51 -08:00
perf_callchain.c
perf_regs.c
process.c arch/idle: Change arch_cpu_idle() behavior: always exit with IRQs disabled 2023-01-13 11:48:15 +01:00
ptrace.c
reset.c
riscv_ksyms.c RISC-V: add infrastructure to allow different str* implementations 2023-01-31 11:43:23 -08:00
sbi.c
setup.c riscv: move riscv_noncoherent_supported() out of ZICBOM probe 2023-01-31 23:29:33 -08:00
signal.c
smp.c
smpboot.c riscv: Move call to init_cpu_topology() to later initialization stage 2023-01-25 07:20:00 -08:00
soc.c
stacktrace.c riscv: Use READ_ONCE_NOCHECK in imprecise unwinding stack mode 2023-03-09 14:50:35 -08:00
suspend.c
suspend_entry.S
sys_riscv.c
syscall_table.c
time.c clocksource/drivers/riscv: Get rid of clocksource_arch_init() callback 2023-02-13 13:10:17 +01:00
trace_irq.c
trace_irq.h
traps.c Merge patch series "riscv: Dump faulting instructions in oops handler" 2023-02-21 17:21:51 -08:00
traps_misaligned.c
vdso.c RISC-V Patches for the 6.3 Merge Window, Part 1 2023-02-25 11:14:08 -08:00
vmlinux-xip.lds.S objtool/idle: Validate __cpuidle code as noinstr 2023-01-13 11:48:15 +01:00
vmlinux.lds.S RISC-V Patches for the 6.3 Merge Window, Part 1 2023-02-25 11:14:08 -08:00