All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] tracing: Fix minor bugs for __unregister_ftrace_function_probe
@ 2009-09-15 10:06 Atsushi Tsuji
  2009-09-16 13:06 ` Steven Rostedt
  2009-09-17  7:48 ` [tip:tracing/core] " tip-bot for Atsushi Tsuji
  0 siblings, 2 replies; 3+ messages in thread
From: Atsushi Tsuji @ 2009-09-15 10:06 UTC (permalink / raw)
  To: linux-kernel, rostedt, Ingo Molnar, fweisbec, Frank Ch. Eigler
  Cc: Peter Zijlstra, paulus, systemtap

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>
---
 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 8c804e2..5ef8f59 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -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, &not);
-- 
1.5.5.1





^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] tracing: Fix minor bugs for __unregister_ftrace_function_probe
  2009-09-15 10:06 [PATCH 1/2] tracing: Fix minor bugs for __unregister_ftrace_function_probe Atsushi Tsuji
@ 2009-09-16 13:06 ` Steven Rostedt
  2009-09-17  7:48 ` [tip:tracing/core] " tip-bot for Atsushi Tsuji
  1 sibling, 0 replies; 3+ messages in thread
From: Steven Rostedt @ 2009-09-16 13:06 UTC (permalink / raw)
  To: Atsushi Tsuji
  Cc: linux-kernel, Ingo Molnar, fweisbec, Frank Ch. Eigler,
	Peter Zijlstra, paulus, systemtap

On Tue, 2009-09-15 at 19:06 +0900, Atsushi Tsuji wrote:
> 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>


This is a real fix, I'll pull it in separately.

Thanks!

-- Steve

> ---
>  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 8c804e2..5ef8f59 100644
> --- a/kernel/trace/ftrace.c
> +++ b/kernel/trace/ftrace.c
> @@ -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, &not);


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [tip:tracing/core] tracing: Fix minor bugs for __unregister_ftrace_function_probe
  2009-09-15 10:06 [PATCH 1/2] tracing: Fix minor bugs for __unregister_ftrace_function_probe Atsushi Tsuji
  2009-09-16 13:06 ` Steven Rostedt
@ 2009-09-17  7:48 ` tip-bot for Atsushi Tsuji
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Atsushi Tsuji @ 2009-09-17  7:48 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, rostedt, a-tsuji, tglx

Commit-ID:  b36461da2a0389149d7f88f3cbc05a30d1db9faa
Gitweb:     http://git.kernel.org/tip/b36461da2a0389149d7f88f3cbc05a30d1db9faa
Author:     Atsushi Tsuji <a-tsuji@bk.jp.nec.com>
AuthorDate: Tue, 15 Sep 2009 19:06:30 +0900
Committer:  Steven Rostedt <rostedt@goodmis.org>
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 <a-tsuji@bk.jp.nec.com>
LKML-Reference: <4AAF6726.5090905@bk.jp.nec.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>


---
 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 8b23d56..f7ab7fc 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, &not);

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-09-17  7:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-15 10:06 [PATCH 1/2] tracing: Fix minor bugs for __unregister_ftrace_function_probe Atsushi Tsuji
2009-09-16 13:06 ` Steven Rostedt
2009-09-17  7:48 ` [tip:tracing/core] " tip-bot for Atsushi Tsuji

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.