diff options
author | 2015-10-26 06:39:46 +0900 | |
---|---|---|
committer | 2015-10-26 06:39:46 +0900 | |
commit | 0bbc367e21bfeea33230d893be4fa3a3ff9bcb48 (patch) | |
tree | 50fb335648a22ac519eddb772714ba64a3e6a7ec /kernel/trace/trace_stack.c | |
parent | USB: core: Codestyle fix in urb.c (diff) | |
parent | Linux 4.3-rc7 (diff) | |
download | wireguard-linux-0bbc367e21bfeea33230d893be4fa3a3ff9bcb48.tar.xz wireguard-linux-0bbc367e21bfeea33230d893be4fa3a3ff9bcb48.zip |
Merge 4.3-rc7 into usb-next
We want the USB and other fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel/trace/trace_stack.c')
-rw-r--r-- | kernel/trace/trace_stack.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/kernel/trace/trace_stack.c b/kernel/trace/trace_stack.c index b746399ab59c..8abf1ba18085 100644 --- a/kernel/trace/trace_stack.c +++ b/kernel/trace/trace_stack.c @@ -85,9 +85,19 @@ check_stack(unsigned long ip, unsigned long *stack) if (!object_is_on_stack(stack)) return; + /* Can't do this from NMI context (can cause deadlocks) */ + if (in_nmi()) + return; + local_irq_save(flags); arch_spin_lock(&max_stack_lock); + /* + * RCU may not be watching, make it see us. + * The stack trace code uses rcu_sched. + */ + rcu_irq_enter(); + /* In case another CPU set the tracer_frame on us */ if (unlikely(!frame_size)) this_size -= tracer_frame; @@ -169,6 +179,7 @@ check_stack(unsigned long ip, unsigned long *stack) } out: + rcu_irq_exit(); arch_spin_unlock(&max_stack_lock); local_irq_restore(flags); } |