[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-9489cc8f370be811f7e741a772bcce88b712272d@git.kernel.org>
Date: Fri, 26 May 2017 01:46:10 -0700
From: tip-bot for Thomas Gleixner <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux@...linux.org.uk, linux-kernel@...r.kernel.org,
tglx@...utronix.de, peterz@...radead.org, rostedt@...dmis.org,
bigeasy@...utronix.de, mingo@...nel.org,
paulmck@...ux.vnet.ibm.com, hpa@...or.com
Subject: [tip:smp/hotplug] arm: Prevent hotplug rwsem recursion
Commit-ID: 9489cc8f370be811f7e741a772bcce88b712272d
Gitweb: http://git.kernel.org/tip/9489cc8f370be811f7e741a772bcce88b712272d
Author: Thomas Gleixner <tglx@...utronix.de>
AuthorDate: Wed, 24 May 2017 10:15:38 +0200
Committer: Thomas Gleixner <tglx@...utronix.de>
CommitDate: Fri, 26 May 2017 10:10:46 +0200
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@...utronix.de>
Acked-by: Ingo Molnar <mingo@...nel.org>
Cc: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Sebastian Siewior <bigeasy@...utronix.de>
Cc: Steven Rostedt <rostedt@...dmis.org>
Cc: Russell King <linux@...linux.org.uk>
Cc: linux-arm-kernel@...ts.infradead.org
Link: http://lkml.kernel.org/r/20170524081549.275871311@linutronix.de
---
arch/arm/kernel/patch.c | 2 +-
arch/arm/probes/kprobes/core.c | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/arm/kernel/patch.c b/arch/arm/kernel/patch.c
index 020560b..a1a3472 100644
--- a/arch/arm/kernel/patch.c
+++ b/arch/arm/kernel/patch.c
@@ -124,5 +124,5 @@ void __kprobes patch_text(void *addr, unsigned int insn)
.insn = insn,
};
- stop_machine(patch_text_stop_machine, &patch, NULL);
+ stop_machine_cpuslocked(patch_text_stop_machine, &patch, NULL);
}
diff --git a/arch/arm/probes/kprobes/core.c b/arch/arm/probes/kprobes/core.c
index ad1f4e6..52d1cd1 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)
Powered by blists - more mailing lists