aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace/ftrace.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/trace/ftrace.c')
-rw-r--r--kernel/trace/ftrace.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 4e6c87ecf1bf..aee95aea57e4 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -2562,7 +2562,7 @@ free:
2562static int start_graph_tracing(void) 2562static int start_graph_tracing(void)
2563{ 2563{
2564 struct ftrace_ret_stack **ret_stack_list; 2564 struct ftrace_ret_stack **ret_stack_list;
2565 int ret; 2565 int ret, cpu;
2566 2566
2567 ret_stack_list = kmalloc(FTRACE_RETSTACK_ALLOC_SIZE * 2567 ret_stack_list = kmalloc(FTRACE_RETSTACK_ALLOC_SIZE *
2568 sizeof(struct ftrace_ret_stack *), 2568 sizeof(struct ftrace_ret_stack *),
@@ -2571,6 +2571,10 @@ static int start_graph_tracing(void)
2571 if (!ret_stack_list) 2571 if (!ret_stack_list)
2572 return -ENOMEM; 2572 return -ENOMEM;
2573 2573
2574 /* The cpu_boot init_task->ret_stack will never be freed */
2575 for_each_online_cpu(cpu)
2576 ftrace_graph_init_task(idle_task(cpu));
2577
2574 do { 2578 do {
2575 ret = alloc_retstack_tasklist(ret_stack_list); 2579 ret = alloc_retstack_tasklist(ret_stack_list);
2576 } while (ret == -EAGAIN); 2580 } while (ret == -EAGAIN);