mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tip-bot for Adrian Hunter <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
	adrian.hunter@intel.com, tglx@linutronix.de, jolsa@redhat.com
Subject: [tip:perf/urgent] perf tools: Fix double free in perf test 21 ( code-reading.c)
Date: Tue, 15 Apr 2014 10:30:30 -0700	[thread overview]
Message-ID: <tip-ae450a7d054cd1fe8d003a085858ca5b90cc74d9@git.kernel.org> (raw)
In-Reply-To: <53465E3E.8070201@intel.com>

Commit-ID:  ae450a7d054cd1fe8d003a085858ca5b90cc74d9
Gitweb:     http://git.kernel.org/tip/ae450a7d054cd1fe8d003a085858ca5b90cc74d9
Author:     Adrian Hunter <adrian.hunter@intel.com>
AuthorDate: Thu, 10 Apr 2014 12:02:54 +0300
Committer:  Jiri Olsa <jolsa@redhat.com>
CommitDate: Tue, 15 Apr 2014 13:57:14 +0200

perf tools: Fix double free in perf test 21 (code-reading.c)

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>
Link: http://lkml.kernel.org/r/53465E3E.8070201@intel.com
Signed-off-by: Jiri Olsa <jolsa@redhat.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;

      parent reply	other threads:[~2014-04-15 17:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-10  8:26 [BUG] perf: double free in perf test 21 (code-reading.c) Jiri Olsa
2014-04-10  9:02 ` [PATCH] perf tools: Fix " Adrian Hunter
2014-04-10  9:09   ` Jiri Olsa
2014-04-15 17:30   ` tip-bot for Adrian Hunter [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=tip-ae450a7d054cd1fe8d003a085858ca5b90cc74d9@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=adrian.hunter@intel.com \
    --cc=hpa@zytor.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    /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