3.10.102-rt113-rc1 stable review patch.
If anyone has any objections, please let me know.

------------------

From: Sebastian Andrzej Siewior <bige...@linutronix.de>

Trace events like raw_syscalls show always a preempt code of one. The
reason is that on PREEMPT kernels rcu_read_lock_sched_notrace()
increases the preemption counter and the function recording the counter
is caller within the RCU section.

Cc: stable...@vger.kernel.org
Signed-off-by: Sebastian Andrzej Siewior <bige...@linutronix.de>
[ Changed this to upstream version. See commit e947841c0dce ]
Signed-off-by: Steven Rostedt <rost...@goodmis.org>
---
 include/trace/ftrace.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h
index dbb47418df81..f30e85b675e8 100644
--- a/include/trace/ftrace.h
+++ b/include/trace/ftrace.h
@@ -526,6 +526,9 @@ ftrace_raw_event_##call(void *__data, proto)                
                \
                                                                        \
        local_save_flags(irq_flags);                                    \
        pc = preempt_count();                                           \
+       /* Account for tracepoint preempt disable */                    \
+       if (IS_ENABLED(CONFIG_PREEMPT))                                 \
+               pc--;                                                   \
                                                                        \
        __data_size = ftrace_get_offsets_##call(&__data_offsets, args); \
                                                                        \
-- 
2.8.1


Reply via email to