diff options
author | Steven Rostedt <srostedt@redhat.com> | 2013-01-24 07:52:34 -0500 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2013-01-24 07:52:34 -0500 |
commit | d41032a83b4683481cadff84bbf8e0eafeaba830 (patch) | |
tree | ba1d406d54fca1bf2be8a554d868633678e07aa8 | |
parent | 0b07436d95b5404134da4d661fd183eac863513e (diff) |
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>
-rw-r--r-- | kernel/trace/trace_functions.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/trace/trace_functions.c b/kernel/trace/trace_functions.c index 1c327ef13a9a..601152523326 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, | |||
61 | struct trace_array *tr = func_trace; | 61 | struct trace_array *tr = func_trace; |
62 | struct trace_array_cpu *data; | 62 | struct trace_array_cpu *data; |
63 | unsigned long flags; | 63 | unsigned long flags; |
64 | unsigned int bit; | 64 | int bit; |
65 | int cpu; | 65 | int cpu; |
66 | int pc; | 66 | int pc; |
67 | 67 | ||