Skip to content

Commit

Permalink
ftrace: prevent recursion
Browse files Browse the repository at this point in the history
Impact: prevent unnecessary stack recursion

if the resched flag was set before we entered, then don't reschedule.

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Lai Jiangshan authored and Ingo Molnar committed Nov 27, 2008
1 parent fb91ee6 commit 4f5a7f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/trace/ring_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -1215,7 +1215,7 @@ ring_buffer_lock_reserve(struct ring_buffer *buffer,

out:
if (resched)
preempt_enable_notrace();
preempt_enable_no_resched_notrace();
else
preempt_enable_notrace();
return NULL;
Expand Down

0 comments on commit 4f5a7f4

Please sign in to comment.