Skip to content

Commit 2c2d732

Browse files
fweisbecIngo Molnar
authored andcommitted
tracing/ftrace: use preempt_enable_no_resched_notrace in ring_buffer_time_stamp()
Impact: prevent a trace recursion After some tests with function graph tracer under x86-32, I saw some recursions caused by ring_buffer_time_stamp() that calls preempt_enable_no_notrace() which calls preempt_schedule() which is traced itself. This patch re-enables preemption without rescheduling. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
1 parent 9dfc3bc commit 2c2d732

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎kernel/trace/ring_buffer.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ u64 ring_buffer_time_stamp(int cpu)
107107
preempt_disable_notrace();
108108
/* shift to debug/test normalization and TIME_EXTENTS */
109109
time = sched_clock() << DEBUG_SHIFT;
110-
preempt_enable_notrace();
110+
preempt_enable_no_resched_notrace();
111111

112112
return time;
113113
}

0 commit comments

Comments
 (0)