Skip to content

tracing: More fixes for 7.0

Steven Rostedt lkml stable 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3tracing: Add NULL pointer check to trigger_data_free()kernel/trace/trace_events_trigger.c+3 -00 replies
2/3tracing: Fix enabling multiple events on the kernel command line and bootconfigkernel/trace/trace_events.c+5 -10 replies
3/3tracing: Fix trace_buf_size= cmdline parameter with sizes >= 2Gkernel/trace/trace.c+3 -30 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [for-linus][PATCH 0/3] tracing: More fixes for 7.0

tracing fixes for 7.0:

- Fix possible NULL pointer dereference in trace_data_alloc()

On the error path in trace_data_alloc(), it can call trigger_data_free() with a NULL pointer. This use to be a kfree() but was changed to trigger_data_free() to clean up any partial initialization. The issue is that trigger_data_free() does not expect a NULL pointer. Have trigger_data_free() return safely on NULL pointer.

- Fix multiple events on the command line and bootconfig

If multiple events are enabled on the command line separately and not grouped, only the last event gets enabled. That is:

trace_event=sched_switch trace_event=sched_waking

Will only enable sched_waking where as:

trace_event=sched_switch,sched_waking

Will enable both.

The bootconfig makes it even worse as the second way is the more common method.

The issue is that a temporary buffer is used to store the events to enable later in boot. Each time the cmdline callback is called, it overwrites what was previously there.

Have the callback append the next value (delimited by a comma) if the temporary buffer already has content.

- Fix command line trace_buffer_size if >= 2G

The logic to allocate the trace buffer uses "int" for the size parameter in the command line code causing overflow issues if more that 2G is specified.

git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git
trace/fixes

Head SHA1: d008ba8be8984760e36d7dcd4adbd5a41a645708

Andrei-Alexandru Tachici (1):
tracing: Fix enabling multiple events on the kernel command line and bootconfig

Calvin Owens (1):
tracing: Fix trace_buf_size= cmdline parameter with sizes >= 2G

Guenter Roeck (1):
tracing: Add NULL pointer check to trigger_data_free()

----

 kernel/trace/trace.c                | 6 +++---
 kernel/trace/trace_events.c         | 6 +++++-
 kernel/trace/trace_events_trigger.c | 3 +++
 3 files changed, 11 insertions(+), 4 deletions(-)