linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Song Liu <liu.song.a23@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>,
	Stephane Eranian <eranian@google.com>,
	lkml <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@kernel.org>,
	Namhyung Kim <namhyung@kernel.org>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: Re: [PATCH perf/urgent] perf tools: Fix crash in ordered_events__free
Date: Thu, 17 Jan 2019 11:06:09 -0300	[thread overview]
Message-ID: <20190117140609.GA5823@kernel.org> (raw)
In-Reply-To: <CAPhsuW78Xk3kK208RMmV6HuwpGmhqX+6Jg=rd3A12LCp7HqFOQ@mail.gmail.com>

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@kernel.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@google.com>
> > Fixes: d5ceb62b3654 ("perf ordered_events: Add 'struct ordered_events_buffer' layer")
> > Reported-by: Song Liu <liu.song.a23@gmail.com>
> > Link: http://lkml.kernel.org/n/tip-914bml5kabz2m9mbywd7el9l@git.kernel.org
> > Signed-off-by: Jiri Olsa <jolsa@kernel.org>
> 
> Reviewed-and-tested-by: Song Liu <songliubraving@fb.com>
> 
> Thanks again for the fix!

Thanks, applied to acme/perf/urgent,

- Arnaldo

  reply	other threads:[~2019-01-17 14:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-17 11:30 [PATCH perf/urgent] perf tools: Fix crash in ordered_events__free Jiri Olsa
2019-01-17 14:03 ` Song Liu
2019-01-17 14:06   ` Arnaldo Carvalho de Melo [this message]
2019-01-22 11:33 ` [tip:perf/urgent] perf ordered_events: " tip-bot for Jiri Olsa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190117140609.GA5823@kernel.org \
    --to=acme@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=eranian@google.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liu.song.a23@gmail.com \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).