From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>,
Ingo Molnar <mingo@kernel.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
LKML <linux-kernel@vger.kernel.org>,
David Ahern <dsahern@gmail.com>,
Adrian Hunter <adrian.hunter@intel.com>
Subject: Re: [PATCH] perf test: Fix hist testcases when kptr_restrict is on
Date: Mon, 14 Dec 2015 12:15:29 -0300 [thread overview]
Message-ID: <20151214151529.GI6843@kernel.org> (raw)
In-Reply-To: <20151214094807.GA27640@krava.brq.redhat.com>
Em Mon, Dec 14, 2015 at 10:48:07AM +0100, Jiri Olsa escreveu:
> On Mon, Dec 14, 2015 at 12:11:13PM +0900, Namhyung Kim wrote:
> > Currently if kptr_restrict is enabled, all hist tests failed with
> > segfaults. This is because machine__create_kernel_maps() in
> > setup_fake_machine() failed in that situation, and it called
> > machine__delete() on the error path. But outer callers again called
> > machines__exit() causing double free for the host machine.
>
> Acked-by: Jiri Olsa <jolsa@kernel.org>
Thanks, applied.
> thanks,
> jirka
>
> >
> > Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> > ---
> > tools/perf/tests/hists_common.c | 5 ++---
> > 1 file changed, 2 insertions(+), 3 deletions(-)
> >
> > diff --git a/tools/perf/tests/hists_common.c b/tools/perf/tests/hists_common.c
> > index 46f453b1de60..bcfd081ee1d2 100644
> > --- a/tools/perf/tests/hists_common.c
> > +++ b/tools/perf/tests/hists_common.c
> > @@ -88,8 +88,8 @@ struct machine *setup_fake_machine(struct machines *machines)
> > }
> >
> > if (machine__create_kernel_maps(machine)) {
> > - pr_debug("Not enough memory for machine setup\n");
> > - goto out;
> > + pr_debug("Cannot create kernel maps\n");
> > + return NULL;
> > }
> >
> > for (i = 0; i < ARRAY_SIZE(fake_threads); i++) {
> > @@ -155,7 +155,6 @@ struct machine *setup_fake_machine(struct machines *machines)
> > out:
> > pr_debug("Not enough memory for machine setup\n");
> > machine__delete_threads(machine);
> > - machine__delete(machine);
> > return NULL;
> > }
> >
> > --
> > 2.6.4
> >
next prev parent reply other threads:[~2015-12-14 15:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-14 3:11 [PATCH] perf test: Fix hist testcases when kptr_restrict is on Namhyung Kim
2015-12-14 9:48 ` Jiri Olsa
2015-12-14 15:15 ` Arnaldo Carvalho de Melo [this message]
2015-12-18 8:47 ` [tip:perf/core] " tip-bot for Namhyung Kim
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=20151214151529.GI6843@kernel.org \
--to=acme@kernel.org \
--cc=a.p.zijlstra@chello.nl \
--cc=adrian.hunter@intel.com \
--cc=dsahern@gmail.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--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 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.