All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Krister Johansen <kjlx@templeofstupid.com>
Cc: stable@vger.kernel.org, acme@redhat.com, fweisbec@gmail.com,
	mhiramat@kernel.org, namhyung@kernel.org
Subject: Re: [PATCH stable-4.9] perf callchain: Reference count maps
Date: Thu, 9 Mar 2017 19:45:23 +0100	[thread overview]
Message-ID: <20170309184523.GA16414@kroah.com> (raw)
In-Reply-To: <20170309175720.GA3408@templeofstupid.com>

On Thu, Mar 09, 2017 at 09:57:20AM -0800, Krister Johansen wrote:
> commit aa33b9b9a2ebb00d33c83a5312d4fbf2d5aeba36 upstream.
> 
> If dso__load_kcore frees all of the existing maps, but one has already
> been attached to a callchain cursor node, then we can get a SIGSEGV in
> any function that happens to try to use this invalid cursor.  Use the
> existing map refcount mechanism to forestall cleanup of a map until the
> cursor iterates past the node.
> 
> Signed-off-by: Krister Johansen <kjlx@templeofstupid.com>
> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> Cc: Frederic Weisbecker <fweisbec@gmail.com>
> Cc: Masami Hiramatsu <mhiramat@kernel.org>
> Cc: Namhyung Kim <namhyung@kernel.org>
> Cc: stable@kernel.org
> Fixes: 84c2cafa2889 ("perf tools: Reference count struct map")
> Link: http://lkml.kernel.org/r/20170106062331.GB2707@templeofstupid.com
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> ---
>  tools/perf/util/callchain.c | 11 +++++++++--
>  tools/perf/util/callchain.h |  6 ++++++
>  tools/perf/util/hist.c      |  7 +++++++
>  3 files changed, 22 insertions(+), 2 deletions(-)
> 
> Apologies for the long lead time on this.  This is the backport that
> I've been using to debug issues on 4.9 kernels in my production
> environment.

Not a problem, thanks for this, now applied.

greg k-h

      reply	other threads:[~2017-03-09 18:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-12 22:03 FAILED: patch "[PATCH] perf callchain: Reference count maps" failed to apply to 4.9-stable tree gregkh
2017-03-09 17:57 ` [PATCH stable-4.9] perf callchain: Reference count maps Krister Johansen
2017-03-09 18:45   ` Greg KH [this message]

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=20170309184523.GA16414@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=acme@redhat.com \
    --cc=fweisbec@gmail.com \
    --cc=kjlx@templeofstupid.com \
    --cc=mhiramat@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=stable@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.