From: tip-bot for Yasser Shalabi <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: mingo@redhat.com, a.p.zijlstra@chello.nl, namhyung@kernel.org,
tglx@linutronix.de, linux-kernel@vger.kernel.org,
yassershalabi@gmail.com, paulus@samba.org, mingo@kernel.org,
hpa@zytor.com, acme@redhat.com
Subject: [tip:perf/urgent] perf evlist: Fix for double free in tools/ perf stat
Date: Wed, 15 Oct 2014 22:23:22 -0700 [thread overview]
Message-ID: <tip-b2e19a934a36b2b4affcde9c170c0f01afabe50a@git.kernel.org> (raw)
In-Reply-To: <1412437077-13109-1-git-send-email-yassershalabi@gmail.com>
Commit-ID: b2e19a934a36b2b4affcde9c170c0f01afabe50a
Gitweb: http://git.kernel.org/tip/b2e19a934a36b2b4affcde9c170c0f01afabe50a
Author: Yasser Shalabi <yassershalabi@gmail.com>
AuthorDate: Sat, 4 Oct 2014 11:37:57 -0400
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 15 Oct 2014 16:16:53 -0300
perf evlist: Fix for double free in tools/perf stat
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>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1412437077-13109-1-git-send-email-yassershalabi@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.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 b4b54d8..3c9e77d 100644
--- a/tools/perf/util/evlist.c
+++ b/tools/perf/util/evlist.c
@@ -1003,6 +1003,7 @@ int perf_evlist__create_maps(struct perf_evlist *evlist, struct target *target)
out_delete_threads:
thread_map__delete(evlist->threads);
+ evlist->threads = NULL;
return -1;
}
prev parent reply other threads:[~2014-10-16 5:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-04 15:37 [PATCH] perf: fix for double free in tools/perf stat Yasser Shalabi
2014-10-07 8:15 ` Namhyung Kim
2014-10-15 19:17 ` Arnaldo Carvalho de Melo
2014-10-16 5:23 ` tip-bot for Yasser Shalabi [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-b2e19a934a36b2b4affcde9c170c0f01afabe50a@git.kernel.org \
--to=tipbot@zytor.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=paulus@samba.org \
--cc=tglx@linutronix.de \
--cc=yassershalabi@gmail.com \
/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