[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190117140609.GA5823@kernel.org>
Date: Thu, 17 Jan 2019 11:06:09 -0300
From: Arnaldo Carvalho de Melo <acme@...nel.org>
To: Song Liu <liu.song.a23@...il.com>
Cc: Jiri Olsa <jolsa@...nel.org>,
Stephane Eranian <eranian@...gle.com>,
lkml <linux-kernel@...r.kernel.org>,
Ingo Molnar <mingo@...nel.org>,
Namhyung Kim <namhyung@...nel.org>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>
Subject: Re: [PATCH perf/urgent] perf tools: Fix crash in ordered_events__free
Em Thu, Jan 17, 2019 at 06:03:04AM -0800, Song Liu escreveu:
> On Thu, Jan 17, 2019 at 3:54 AM Jiri Olsa <jolsa@...nel.org> wrote:
> >
> > 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 the buffers during
> > event processing. The subsequent ordered_events__free
> > assumes the oe->buffer != NULL and crashes. Adding
> > the check to prevent that.
> >
> > Cc: Stephane Eranian <eranian@...gle.com>
> > Fixes: d5ceb62b3654 ("perf ordered_events: Add 'struct ordered_events_buffer' layer")
> > Reported-by: Song Liu <liu.song.a23@...il.com>
> > Link: http://lkml.kernel.org/n/tip-914bml5kabz2m9mbywd7el9l@git.kernel.org
> > Signed-off-by: Jiri Olsa <jolsa@...nel.org>
>
> Reviewed-and-tested-by: Song Liu <songliubraving@...com>
>
> Thanks again for the fix!
Thanks, applied to acme/perf/urgent,
- Arnaldo
Powered by blists - more mailing lists