diff options
author | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2017-08-17 22:37:25 +0200 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2017-08-24 16:04:01 +0200 |
commit | a8f0f9e49956a74718874b800251455680085600 (patch) | |
tree | d01ffa943d7a2382bdd50255a4949fa696737b66 /.get_maintainer.ignore | |
parent | ring-buffer: Have ring_buffer_alloc_read_page() return error on offline CPU (diff) | |
download | linux-a8f0f9e49956a74718874b800251455680085600.tar.xz linux-a8f0f9e49956a74718874b800251455680085600.zip |
ftrace: Check for null ret_stack on profile function graph entry function
There's a small race when function graph shutsdown and the calling of the
registered function graph entry callback. The callback must not reference
the task's ret_stack without first checking that it is not NULL. Note, when
a ret_stack is allocated for a task, it stays allocated until the task exits.
The problem here, is that function_graph is shutdown, and a new task was
created, which doesn't have its ret_stack allocated. But since some of the
functions are still being traced, the callbacks can still be called.
The normal function_graph code handles this, but starting with commit
8861dd303c ("ftrace: Access ret_stack->subtime only in the function
profiler") the profiler code references the ret_stack on function entry, but
doesn't check if it is NULL first.
Link: https://bugzilla.kernel.org/show_bug.cgi?id=196611
Cc: stable@vger.kernel.org
Fixes: 8861dd303c ("ftrace: Access ret_stack->subtime only in the function profiler")
Reported-by: lilydjwg@gmail.com
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to '.get_maintainer.ignore')
0 files changed, 0 insertions, 0 deletions