* Patch "tracing: Remove RCU work arounds from stack tracer" has been added to the 4.13-stable tree
@ 2017-10-02 9:42 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-10-02 9:42 UTC (permalink / raw)
To: rostedt, gregkh, paulmck; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
tracing: Remove RCU work arounds from stack tracer
to the 4.13-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
tracing-remove-rcu-work-arounds-from-stack-tracer.patch
and it can be found in the queue-4.13 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 15516c89acce948debc4c598e03c3fee53045797 Mon Sep 17 00:00:00 2001
From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
Date: Thu, 21 Sep 2017 13:00:21 -0400
Subject: tracing: Remove RCU work arounds from stack tracer
From: Steven Rostedt (VMware) <rostedt@goodmis.org>
commit 15516c89acce948debc4c598e03c3fee53045797 upstream.
Currently the stack tracer calls rcu_irq_enter() to make sure RCU
is watching when it records a stack trace. But if the stack tracer
is triggered while tracing inside of a rcu_irq_enter(), calling
rcu_irq_enter() unconditionally can be problematic.
The reason for having rcu_irq_enter() in the first place has been
fixed from within the saving of the stack trace code, and there's no
reason for doing it in the stack tracer itself. Just remove it.
Fixes: 0be964be0 ("module: Sanitize RCU usage and locking")
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Suggested-by: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
kernel/trace/trace_stack.c | 15 ---------------
1 file changed, 15 deletions(-)
--- a/kernel/trace/trace_stack.c
+++ b/kernel/trace/trace_stack.c
@@ -96,23 +96,9 @@ check_stack(unsigned long ip, unsigned l
if (in_nmi())
return;
- /*
- * There's a slight chance that we are tracing inside the
- * RCU infrastructure, and rcu_irq_enter() will not work
- * as expected.
- */
- if (unlikely(rcu_irq_enter_disabled()))
- return;
-
local_irq_save(flags);
arch_spin_lock(&stack_trace_max_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;
@@ -205,7 +191,6 @@ check_stack(unsigned long ip, unsigned l
}
out:
- rcu_irq_exit();
arch_spin_unlock(&stack_trace_max_lock);
local_irq_restore(flags);
}
Patches currently in stable-queue which might be from rostedt@goodmis.org are
queue-4.13/tracing-erase-irqsoff-trace-with-empty-write.patch
queue-4.13/tracing-fix-trace_pipe-behavior-for-instance-traces.patch
queue-4.13/genirq-fix-cpumask-check-in-__irq_startup_managed.patch
queue-4.13/tracing-remove-rcu-work-arounds-from-stack-tracer.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-10-02 9:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-02 9:42 Patch "tracing: Remove RCU work arounds from stack tracer" has been added to the 4.13-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).