arm: Prevent hotplug rwsem recursion
authorThomas Gleixner <tglx@linutronix.de>
Wed, 24 May 2017 08:15:38 +0000 (10:15 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 26 May 2017 08:10:46 +0000 (10:10 +0200)
commit9489cc8f370be811f7e741a772bcce88b712272d
tree83430d550a65809411d03679afc70c3b3c0deaef
parentc23a465625e287c4deba0fdf5e8adc59cfd2a0b7
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
arch/arm/kernel/patch.c
arch/arm/probes/kprobes/core.c