]> git.baikalelectronics.ru Git - kernel.git/commit
tracing: Fix unsigned int compare of zero in recursion check
authorSteven Rostedt <srostedt@redhat.com>
Thu, 24 Jan 2013 12:52:34 +0000 (07:52 -0500)
committerSteven Rostedt <rostedt@goodmis.org>
Thu, 24 Jan 2013 12:52:34 +0000 (07:52 -0500)
commit06b0bce1841ca6014e5aa4c6cd8460717c09aaa2
treeba1d406d54fca1bf2be8a554d868633678e07aa8
parent9c6d90595fe2548db3344889340cb902fa68ddf7
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>
kernel/trace/trace_functions.c