diff options
Diffstat (limited to 'kernel/trace/ftrace.c')
-rw-r--r-- | kernel/trace/ftrace.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 90d99fb02ae4..53042f118f23 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c | |||
@@ -1628,8 +1628,13 @@ void ftrace_retfunc_init_task(struct task_struct *t) | |||
1628 | 1628 | ||
1629 | void ftrace_retfunc_exit_task(struct task_struct *t) | 1629 | void ftrace_retfunc_exit_task(struct task_struct *t) |
1630 | { | 1630 | { |
1631 | kfree(t->ret_stack); | 1631 | struct ftrace_ret_stack *ret_stack = t->ret_stack; |
1632 | |||
1632 | t->ret_stack = NULL; | 1633 | t->ret_stack = NULL; |
1634 | /* NULL must become visible to IRQs before we free it: */ | ||
1635 | barrier(); | ||
1636 | |||
1637 | kfree(ret_stack); | ||
1633 | } | 1638 | } |
1634 | #endif | 1639 | #endif |
1635 | 1640 | ||