All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][GIT PULL] tracing: Fix unsigned int compare of zero in recursion check
@ 2013-01-24 13:29 Steven Rostedt
  2013-01-24 13:33 ` Ingo Molnar
  0 siblings, 1 reply; 2+ messages in thread
From: Steven Rostedt @ 2013-01-24 13:29 UTC (permalink / raw)
  To: LKML; +Cc: Ingo Molnar, Andrew Morton, Dan Carpenter


Ingo,

I've put this on top of the patches I posted for linux-next, as
those were the patches that contained the bug this fixed.

Please pull the latest tip/perf/core tree, which can be found at:

  git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
tip/perf/core

Head SHA1: d41032a83b4683481cadff84bbf8e0eafeaba830


Steven Rostedt (1):
      tracing: Fix unsigned int compare of zero in recursion check

----
 kernel/trace/trace_functions.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---------------------------
commit d41032a83b4683481cadff84bbf8e0eafeaba830
Author: Steven Rostedt <srostedt@redhat.com>
Date:   Thu Jan 24 07:52:34 2013 -0500

    tracing: Fix unsigned int compare of zero in recursion check
    
    Dan's smatch found a compare bug with the result of the
    trace_test_and_set_recursion() and comparing to less than
    zero. If the function fails, it returns -1, but was saved in
    an unsigned int, which will never be less than zero and will
    ignore the result of the test if a recursion did happen.
    
    Luckily this is the last of the recursion tests, as the
    infrastructure of ftrace would catch recursions before it
    got here, except for some few exceptions.
    
    Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

diff --git a/kernel/trace/trace_functions.c b/kernel/trace/trace_functions.c
index 1c327ef..6011525 100644
--- a/kernel/trace/trace_functions.c
+++ b/kernel/trace/trace_functions.c
@@ -61,7 +61,7 @@ function_trace_call(unsigned long ip, unsigned long parent_ip,
 	struct trace_array *tr = func_trace;
 	struct trace_array_cpu *data;
 	unsigned long flags;
-	unsigned int bit;
+	int bit;
 	int cpu;
 	int pc;
 



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

* Re: [PATCH][GIT PULL] tracing: Fix unsigned int compare of zero in recursion check
  2013-01-24 13:29 [PATCH][GIT PULL] tracing: Fix unsigned int compare of zero in recursion check Steven Rostedt
@ 2013-01-24 13:33 ` Ingo Molnar
  0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2013-01-24 13:33 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: LKML, Andrew Morton, Dan Carpenter


* Steven Rostedt <rostedt@goodmis.org> wrote:

> Ingo,
> 
> I've put this on top of the patches I posted for linux-next, 
> as those were the patches that contained the bug this fixed.
> 
> Please pull the latest tip/perf/core tree, which can be found at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
> tip/perf/core
> 
> Head SHA1: d41032a83b4683481cadff84bbf8e0eafeaba830
> 
> 
> Steven Rostedt (1):
>       tracing: Fix unsigned int compare of zero in recursion check
> 
> ----
>  kernel/trace/trace_functions.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Pulled, thanks Steve!

	Ingo

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

end of thread, other threads:[~2013-01-24 13:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-24 13:29 [PATCH][GIT PULL] tracing: Fix unsigned int compare of zero in recursion check Steven Rostedt
2013-01-24 13:33 ` Ingo Molnar

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.