]> git.baikalelectronics.ru Git - kernel.git/commit
tracing: Fix now invalid var_ref_vals assumption in trace action
authorTom Zanussi <zanussi@kernel.org>
Thu, 30 Jan 2020 02:18:18 +0000 (21:18 -0500)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Fri, 31 Jan 2020 17:59:26 +0000 (12:59 -0500)
commita264f7b516dc7efd0072578171e0eeb1d77f1bb8
tree781b5a6f48001ec6477957df7d1637fe9d9a8b10
parent78d235f53b370d075950fcae145f4b0cf682e3eb
tracing: Fix now invalid var_ref_vals assumption in trace action

The patch 'tracing: Fix histogram code when expression has same var as
value' added code to return an existing variable reference when
creating a new variable reference, which resulted in var_ref_vals
slots being reused instead of being duplicated.

The implementation of the trace action assumes that the end of the
var_ref_vals array starting at action_data.var_ref_idx corresponds to
the values that will be assigned to the trace params. The patch
mentioned above invalidates that assumption, which means that each
param needs to explicitly specify its index into var_ref_vals.

This fix changes action_data.var_ref_idx to an array of var ref
indexes to account for that.

Link: https://lore.kernel.org/r/1580335695.6220.8.camel@kernel.org
Fixes: 1d4d18f2362c ("tracing: Fix histogram code when expression has same var as value")
Signed-off-by: Tom Zanussi <zanussi@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
kernel/trace/trace_events_hist.c