summaryrefslogtreecommitdiff
path: root/arch/arm/probes
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2017-05-24 10:15:38 +0200
committerThomas Gleixner <tglx@linutronix.de>2017-05-26 10:10:46 +0200
commit9489cc8f370be811f7e741a772bcce88b712272d (patch)
tree83430d550a65809411d03679afc70c3b3c0deaef /arch/arm/probes
parentc23a465625e287c4deba0fdf5e8adc59cfd2a0b7 (diff)
downloadlwn-9489cc8f370be811f7e741a772bcce88b712272d.tar.gz
lwn-9489cc8f370be811f7e741a772bcce88b712272d.zip
arm: Prevent hotplug rwsem recursion
The text patching functions which are invoked from jump_label and kprobes code are protected against cpu hotplug at the call sites. Use stop_machine_cpuslocked() to avoid recursion on the cpu hotplug rwsem. stop_machine_cpuslocked() contains a lockdep assertion to catch any unprotected callers. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Ingo Molnar <mingo@kernel.org> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Sebastian Siewior <bigeasy@linutronix.de> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Russell King <linux@armlinux.org.uk> Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/20170524081549.275871311@linutronix.de
Diffstat (limited to 'arch/arm/probes')
-rw-r--r--arch/arm/probes/kprobes/core.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm/probes/kprobes/core.c b/arch/arm/probes/kprobes/core.c
index ad1f4e6a9e33..52d1cd14fda4 100644
--- a/arch/arm/probes/kprobes/core.c
+++ b/arch/arm/probes/kprobes/core.c
@@ -182,7 +182,8 @@ void __kprobes kprobes_remove_breakpoint(void *addr, unsigned int insn)
.addr = addr,
.insn = insn,
};
- stop_machine(__kprobes_remove_breakpoint, &p, cpu_online_mask);
+ stop_machine_cpuslocked(__kprobes_remove_breakpoint, &p,
+ cpu_online_mask);
}
void __kprobes arch_disarm_kprobe(struct kprobe *p)