mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: Adrian Hunter <adrian.hunter@intel.com>
Cc: linux-kernel@vger.kernel.org, David Ahern <dsahern@gmail.com>,
	Namhyung Kim <namhyung@kernel.org>,
	Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: Re: [PATCH] perf tools: Fix double free in perf test 21 (code-reading.c)
Date: Thu, 10 Apr 2014 11:09:25 +0200	[thread overview]
Message-ID: <20140410090925.GD1141@krava.brq.redhat.com> (raw)
In-Reply-To: <53465E3E.8070201@intel.com>

On Thu, Apr 10, 2014 at 12:02:54PM +0300, Adrian Hunter wrote:
> perf_evlist__delete() deletes attached cpu and thread maps
> but the test is still using them, so remove them from the
> evlist before deleting it.
> 
> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
> ---
>  tools/perf/tests/code-reading.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tools/perf/tests/code-reading.c b/tools/perf/tests/code-reading.c
> index 653a8fe..bfb1869 100644
> --- a/tools/perf/tests/code-reading.c
> +++ b/tools/perf/tests/code-reading.c
> @@ -504,6 +504,7 @@ static int do_test_code_reading(bool try_kcore)
>  		if (ret < 0) {
>  			if (!excl_kernel) {
>  				excl_kernel = true;
> +				perf_evlist__set_maps(evlist, NULL, NULL);
>  				perf_evlist__delete(evlist);
>  				evlist = NULL;
>  				continue;
> -- 
> 1.8.3.2
> 
> 

Acked-by: Jiri Olsa <jolsa@redhat.com>

thanks,
jirka

  reply	other threads:[~2014-04-10  9:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-10  8:26 [BUG] perf: " Jiri Olsa
2014-04-10  9:02 ` [PATCH] perf tools: Fix " Adrian Hunter
2014-04-10  9:09   ` Jiri Olsa [this message]
2014-04-15 17:30   ` [tip:perf/urgent] perf tools: Fix double free in perf test 21 ( code-reading.c) tip-bot for Adrian Hunter

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=20140410090925.GD1141@krava.brq.redhat.com \
    --to=jolsa@redhat.com \
    --cc=acme@redhat.com \
    --cc=adrian.hunter@intel.com \
    --cc=dsahern@gmail.com \
    --cc=linux-kernel@vger.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

Powered by JetHome