mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-04-02 04:14:14 +00:00
kprobes/x86: Move the get_kprobe_ctlblk() into irq-disabled block
Since get_kprobe_ctlblk() accesses per-cpu variables which calls smp_processor_id(), it must be called under preempt-disabled or irq-disabled. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Cc: Alexei Starovoitov <ast@fb.com> Cc: Alexei Starovoitov <ast@kernel.org> Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Paul E . McKenney <paulmck@linux.vnet.ibm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/150581517952.32348.2655896843219158446.stgit@devbox Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
parent
3539d09154
commit
cd52edad55
1 changed files with 1 additions and 1 deletions
|
@ -154,7 +154,6 @@ STACK_FRAME_NON_STANDARD(optprobe_template_func);
|
||||||
static void
|
static void
|
||||||
optimized_callback(struct optimized_kprobe *op, struct pt_regs *regs)
|
optimized_callback(struct optimized_kprobe *op, struct pt_regs *regs)
|
||||||
{
|
{
|
||||||
struct kprobe_ctlblk *kcb = get_kprobe_ctlblk();
|
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
/* This is possible if op is under delayed unoptimizing */
|
/* This is possible if op is under delayed unoptimizing */
|
||||||
|
@ -165,6 +164,7 @@ optimized_callback(struct optimized_kprobe *op, struct pt_regs *regs)
|
||||||
if (kprobe_running()) {
|
if (kprobe_running()) {
|
||||||
kprobes_inc_nmissed_count(&op->kp);
|
kprobes_inc_nmissed_count(&op->kp);
|
||||||
} else {
|
} else {
|
||||||
|
struct kprobe_ctlblk *kcb = get_kprobe_ctlblk();
|
||||||
/* Save skipped registers */
|
/* Save skipped registers */
|
||||||
#ifdef CONFIG_X86_64
|
#ifdef CONFIG_X86_64
|
||||||
regs->cs = __KERNEL_CS;
|
regs->cs = __KERNEL_CS;
|
||||||
|
|
Loading…
Add table
Reference in a new issue