From: Yasser Shalabi <yassershalabi@gmail.com>
To: acme@kernel.org
Cc: linux-kernel@vger.kernel.org, mingo@redhat.com, paulus@samba.org,
a.p.zijlstra@chello.nl, Yasser Shalabi <yassershalabi@gmail.com>
Subject: [PATCH] perf: fix for double free in tools/perf stat
Date: Sat, 4 Oct 2014 11:37:57 -0400 [thread overview]
Message-ID: <1412437077-13109-1-git-send-email-yassershalabi@gmail.com> (raw)
Fix for double free bug in tools/perf due to dangling thread_map pointer in perf_evlist struct.
Code path excercised when perf stat -C switch is used but not set and is followed by another switch.
Example: perf stat -C -e.
Signed-off-by: Yasser Shalabi <yassershalabi@gmail.com>
---
tools/perf/util/evlist.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c
index 814e954..09af633 100644
--- a/tools/perf/util/evlist.c
+++ b/tools/perf/util/evlist.c
@@ -845,6 +845,7 @@ int perf_evlist__create_maps(struct perf_evlist *evlist, struct target *target)
out_delete_threads:
thread_map__delete(evlist->threads);
+ evlist->threads = 0;
return -1;
}
--
1.7.10.4
next reply other threads:[~2014-10-04 16:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-04 15:37 Yasser Shalabi [this message]
2014-10-07 8:15 ` Namhyung Kim
2014-10-15 19:17 ` Arnaldo Carvalho de Melo
2014-10-16 5:23 ` [tip:perf/urgent] perf evlist: Fix for double free in tools/ perf stat tip-bot for Yasser Shalabi
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=1412437077-13109-1-git-send-email-yassershalabi@gmail.com \
--to=yassershalabi@gmail.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=paulus@samba.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
all inboxes | Powered by JetHome®