ftrace: Check for empty hash and comment the race with registering probes
authorSteven Rostedt (VMware) <rostedt@goodmis.org>
Fri, 30 Aug 2019 20:30:01 +0000 (16:30 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Sep 2019 08:22:13 +0000 (10:22 +0200)
commit8ea639525db652d33b2673f97e2db21a6d2564ef
treef68e13eb93e97a61c32c15f58fb22429e6f14699
parent9d98e0f4859d970291dc95996d8fdee058455edc
ftrace: Check for empty hash and comment the race with registering probes

commit 372e0d01da71c84dcecf7028598a33813b0d5256 upstream.

The race between adding a function probe and reading the probes that exist
is very subtle. It needs a comment. Also, the issue can also happen if the
probe has has the EMPTY_HASH as its func_hash.

Cc: stable@vger.kernel.org
Fixes: 7b60f3d876156 ("ftrace: Dynamically create the probe ftrace_ops for the trace_array")
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/trace/ftrace.c