Skip to content

tracing: Fix adding some modifiers to histogram values

Steven Rostedt linux-trace-kernel lkml stable 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2tracing: Do not let histogram values have some modifierskernel/trace/trace_events_hist.c+9 -01 reply
2/2tracing: Check field value in hist_field_name()kernel/trace/trace_events_hist.c+3 -01 reply

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by.

PatchMark Rutland
1/2T-b
2/2T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] tracing: Fix adding some modifiers to histogram values

Mark Rutland reported to me on IRC that he accidentally added the ".buckets=8" modifier to hitcount. This should not be allowed, but it did not error. Worse yet, when reading the hist file, it would crash as there was a NULL pointer dereference due to the values not having fields assigned to them.

The first fix is to make sure that histogram values do not get assigned modifiers that they can't use.

The the second patch is to not crash if a NULL pointer is passed to hist_field_name() (which is what happens if you allow some of these modifiers to be used by values).

Steven Rostedt (Google) (2):
tracing: Do not let histogram values have some modifiers
tracing: Check field value in hist_field_name()

----

 kernel/trace/trace_events_hist.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)