mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-03 00:54:09 +08:00
ftrace: prevent recursion
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>
This commit is contained in:
parent
fb91ee6cf5
commit
4f5a7f40dd
@ -1215,7 +1215,7 @@ ring_buffer_lock_reserve(struct ring_buffer *buffer,
|
|||||||
|
|
||||||
out:
|
out:
|
||||||
if (resched)
|
if (resched)
|
||||||
preempt_enable_notrace();
|
preempt_enable_no_resched_notrace();
|
||||||
else
|
else
|
||||||
preempt_enable_notrace();
|
preempt_enable_notrace();
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user