Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'trace-fixes-v4.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace

Pull tracing fixes from Steven Rostedt:
"Running tests on other changes, the system locked up due to lots of
warnings. It was caused by the stack tracer triggering a warning
about using rcu_dereference() when RCU was not watching. This can
happen due to the fact that the stack tracer uses the function tracer
to check each function, and there are functions that may be called and
traced when RCU stopped watching. Namely when a function is called
just before going idle or to userspace and after RCU stopped watching
that current CPU.

The first patch makes sure that RCU is watching when the stack tracer
uses RCU. The second patch is to make sure that the stack tracer does
not get called by functions in NMI, as it's not NMI safe"

* tag 'trace-fixes-v4.3-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
tracing: Do not allow stack_tracer to record stack in NMI
tracing: Have stack tracer force RCU to be watching

+11
+11
kernel/trace/trace_stack.c
··· 85 85 if (!object_is_on_stack(stack)) 86 86 return; 87 87 88 + /* Can't do this from NMI context (can cause deadlocks) */ 89 + if (in_nmi()) 90 + return; 91 + 88 92 local_irq_save(flags); 89 93 arch_spin_lock(&max_stack_lock); 94 + 95 + /* 96 + * RCU may not be watching, make it see us. 97 + * The stack trace code uses rcu_sched. 98 + */ 99 + rcu_irq_enter(); 90 100 91 101 /* In case another CPU set the tracer_frame on us */ 92 102 if (unlikely(!frame_size)) ··· 179 169 } 180 170 181 171 out: 172 + rcu_irq_exit(); 182 173 arch_spin_unlock(&max_stack_lock); 183 174 local_irq_restore(flags); 184 175 }