Commit b36461da authored by Atsushi Tsuji's avatar Atsushi Tsuji Committed by Steven Rostedt

tracing: Fix minor bugs for __unregister_ftrace_function_probe

Fix the condition of strcmp for "*".
Also fix NULL pointer dereference when glob is NULL.
Signed-off-by: default avatarAtsushi Tsuji <a-tsuji@bk.jp.nec.com>
LKML-Reference: <4AAF6726.5090905@bk.jp.nec.com>
Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
parent fe832a3a
...@@ -2062,9 +2062,9 @@ __unregister_ftrace_function_probe(char *glob, struct ftrace_probe_ops *ops, ...@@ -2062,9 +2062,9 @@ __unregister_ftrace_function_probe(char *glob, struct ftrace_probe_ops *ops,
int i, len = 0; int i, len = 0;
char *search; char *search;
if (glob && (strcmp(glob, "*") || !strlen(glob))) if (glob && (strcmp(glob, "*") == 0 || !strlen(glob)))
glob = NULL; glob = NULL;
else { else if (glob) {
int not; int not;
type = ftrace_setup_glob(glob, strlen(glob), &search, &not); type = ftrace_setup_glob(glob, strlen(glob), &search, &not);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment