diff options
author | Atsushi Tsuji <a-tsuji@bk.jp.nec.com> | 2009-09-15 19:06:30 +0900 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2009-09-16 09:08:54 -0400 |
commit | b36461da2a0389149d7f88f3cbc05a30d1db9faa (patch) | |
tree | c9a4a6414185474e106d538705089a3fa3506a45 /kernel/trace | |
parent | fe832a3a48737b24f95fab202b1c67fb588b071d (diff) | |
download | blackbird-obmc-linux-b36461da2a0389149d7f88f3cbc05a30d1db9faa.tar.gz blackbird-obmc-linux-b36461da2a0389149d7f88f3cbc05a30d1db9faa.zip |
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: Atsushi Tsuji <a-tsuji@bk.jp.nec.com>
LKML-Reference: <4AAF6726.5090905@bk.jp.nec.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace')
-rw-r--r-- | kernel/trace/ftrace.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 8b23d5670088..f7ab7fc162cc 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c @@ -2062,9 +2062,9 @@ __unregister_ftrace_function_probe(char *glob, struct ftrace_probe_ops *ops, int i, len = 0; char *search; - if (glob && (strcmp(glob, "*") || !strlen(glob))) + if (glob && (strcmp(glob, "*") == 0 || !strlen(glob))) glob = NULL; - else { + else if (glob) { int not; type = ftrace_setup_glob(glob, strlen(glob), &search, ¬); |