tracing: More fixes for 7.0
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | tracing: Add NULL pointer check to trigger_data_free()kernel/ | +3 | 0 replies | |
| 2/3 | tracing: Fix enabling multiple events on the kernel command line and bootconfigkernel/ | +5 | 0 replies | |
| 3/3 | tracing: Fix trace_buf_size= cmdline parameter with sizes >= 2Gkernel/ | +3 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
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(-)