]> git.baikalelectronics.ru Git - kernel.git/commit
tracing: Uninitialized variable in create_tracing_map_fields()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 28 Mar 2018 11:48:15 +0000 (14:48 +0300)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Fri, 6 Apr 2018 12:56:50 +0000 (08:56 -0400)
commita89b8a96085ddcadcba6c1465c3156cd766fd6c9
tree3d39a6a0f1f4c592e8a201206c5ee0d805a7ac0f
parent5eb7053480d5bf10360d863cb363a6d3447c6ca2
tracing: Uninitialized variable in create_tracing_map_fields()

Smatch complains that idx can be used uninitialized when we check if
(idx < 0).  It has to be the first iteration through the loop and the
HIST_FIELD_FL_STACKTRACE bit has to be clear and the HIST_FIELD_FL_VAR
bit has to be set to reach the bug.

Link: http://lkml.kernel.org/r/20180328114815.GC29050@mwanda
Fixes: 6ac0075044a9 ("tracing: Add variable support to hist triggers")
Acked-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
kernel/trace/trace_events_hist.c