Skip to content
Commit 82310a32 authored by Steven Rostedt's avatar Steven Rostedt Committed by Steven Rostedt
Browse files

function-graph: enable the stack after initialization of other variables



The function graph tracer checks if the task_struct has ret_stack defined
to know if it is OK or not to use it. The initialization is done for
all tasks by one process, but the idle tasks use the same initialization
used by new tasks.

If an interrupt happens on an idle task that just had the ret_stack
created, but before the rest of the initialization took place, then
we can corrupt the return address of the functions.

This patch moves the setting of the task_struct's ret_stack to after
the other variables have been initialized.

[ Impact: prevent kernel panic on idle task when starting function graph ]

Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
parent 179c498a
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment