diff options
author | Jiri Olsa <[email protected]> | 2019-01-17 12:30:17 +0100 |
---|---|---|
committer | Arnaldo Carvalho de Melo <[email protected]> | 2019-01-17 11:07:00 -0300 |
commit | 99d86c8b88393e29cf07c020585f2c8afbcdd97d (patch) | |
tree | b5864b2423de4c5d8231a7f3d20edfbea56658d7 /net/lapb/lapb_timer.c | |
parent | 4e72ee8872279a70ebe973172133b98e8acbf54e (diff) |
perf ordered_events: Fix crash in ordered_events__free
Song Liu reported crash in 'perf record':
> #0 0x0000000000500055 in ordered_events(float, long double,...)(...) ()
> #1 0x0000000000500196 in ordered_events.reinit ()
> #2 0x00000000004fe413 in perf_session.process_events ()
> #3 0x0000000000440431 in cmd_record ()
> #4 0x00000000004a439f in run_builtin ()
> #5 0x000000000042b3e5 in main ()"
This can happen when we get out of buffers during event processing.
The subsequent ordered_events__free() call assumes oe->buffer != NULL
and crashes. Add a check to prevent that.
Reported-by: Song Liu <[email protected]>
Signed-off-by: Jiri Olsa <[email protected]>
Reviewed-by: Song Liu <[email protected]>
Tested-by: Song Liu <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Stephane Eranian <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Fixes: d5ceb62b3654 ("perf ordered_events: Add 'struct ordered_events_buffer' layer")
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'net/lapb/lapb_timer.c')
0 files changed, 0 insertions, 0 deletions