aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/trace/ftrace.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index f1ed080406c3..ebff62ef40be 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -2643,8 +2643,10 @@ static int start_graph_tracing(void)
2643 return -ENOMEM; 2643 return -ENOMEM;
2644 2644
2645 /* The cpu_boot init_task->ret_stack will never be freed */ 2645 /* The cpu_boot init_task->ret_stack will never be freed */
2646 for_each_online_cpu(cpu) 2646 for_each_online_cpu(cpu) {
2647 ftrace_graph_init_task(idle_task(cpu)); 2647 if (!idle_task(cpu)->ret_stack)
2648 ftrace_graph_init_task(idle_task(cpu));
2649 }
2648 2650
2649 do { 2651 do {
2650 ret = alloc_retstack_tasklist(ret_stack_list); 2652 ret = alloc_retstack_tasklist(ret_stack_list);