tracing: Fix minor bugs for __unregister_ftrace_function_probe
PATCH 1/2 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 <[email protected]>
--- kernel/trace/ftrace.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
kernel/trace/ftrace.c +2 -2
@@ -2059,9 +2059,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, ¬);
Signature · 1 line
1.5.5.1
Steven Rostedt
maintainerQuoted 4 lines · Atsushi Tsuji
Fix the condition of strcmp for "*".
Also fix NULL pointer dereference when glob is NULL.Signed-off-by Atsushi Tsuji <[email protected]>
This is a real fix, I'll pull it in separately.
Thanks!
-- Steve
Quoted 20 lines
--- kernel/trace/ftrace.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)kernel/trace/ftrace.c +2
-2@@ -2059,9 +2059,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, ¬);
Commit-ID: b36461da2a0389149d7f88f3cbc05a30d1db9faa Gitweb: http://git.kernel.org/tip/b36461da2a0389149d7f88f3cbc05a30d1db9faa Author: Atsushi Tsuji <[email protected]> AuthorDate: Tue, 15 Sep 2009 19:06:30 +0900 Committer: Steven Rostedt <[email protected]> CommitDate: Wed, 16 Sep 2009 09:08:54 -0400
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 <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by Steven Rostedt <[email protected]>
--- kernel/trace/ftrace.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
kernel/trace/ftrace.c +2 -2
@@ -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, ¬);