From: tip-bot for Jiri Olsa <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: hpa@zytor.com, jolsa@redhat.com, adrian.hunter@intel.com,
ak@linux.intel.com, tglx@linutronix.de, mpetlan@redhat.com,
jolsa@kernel.org, mingo@kernel.org, acme@redhat.com,
namhyung@kernel.org, a.p.zijlstra@chello.nl, kan.liang@intel.com,
linux-kernel@vger.kernel.org
Subject: [tip:perf/core] perf symbols: Fix endless loop in dso__split_kallsyms_for_kcore
Date: Thu, 29 Oct 2015 02:42:58 -0700 [thread overview]
Message-ID: <tip-443f8c75e8d58d394b0e65b47e02e5cd8ed32b41@git.kernel.org> (raw)
In-Reply-To: <20151026135130.GA26003@krava.brq.redhat.com>
Commit-ID: 443f8c75e8d58d394b0e65b47e02e5cd8ed32b41
Gitweb: http://git.kernel.org/tip/443f8c75e8d58d394b0e65b47e02e5cd8ed32b41
Author: Jiri Olsa <jolsa@redhat.com>
AuthorDate: Mon, 26 Oct 2015 14:51:30 +0100
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 28 Oct 2015 11:19:30 -0300
perf symbols: Fix endless loop in dso__split_kallsyms_for_kcore
Currently we split symbols based on the map comparison, but symbols are stored
within dso objects and maps could point into same dso objects (kernel maps).
Hence we could end up changing rbtree we are currently iterating and mess it
up. It's easily reproduced on s390x by running:
$ perf record -a -- sleep 3
$ perf buildid-list -i perf.data --with-hits
The fix is to compare dso objects instead.
Reported-by: Michael Petlan <mpetlan@redhat.com>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Kan Liang <kan.liang@intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/20151026135130.GA26003@krava.brq.redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/symbol.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index 71bf711..b4cc766 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -680,7 +680,7 @@ static int dso__split_kallsyms_for_kcore(struct dso *dso, struct map *map,
pos->start -= curr_map->start - curr_map->pgoff;
if (pos->end)
pos->end -= curr_map->start - curr_map->pgoff;
- if (curr_map != map) {
+ if (curr_map->dso != map->dso) {
rb_erase_init(&pos->rb_node, root);
symbols__insert(
&curr_map->dso->symbols[curr_map->type],
prev parent reply other threads:[~2015-10-29 9:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-26 13:01 [BUG] reporting stuck on s390 " Jiri Olsa
2015-10-26 13:22 ` Adrian Hunter
2015-10-26 13:51 ` [PATCH] perf tools: Fix endless loop " Jiri Olsa
2015-10-29 9:42 ` tip-bot for Jiri Olsa [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-443f8c75e8d58d394b0e65b47e02e5cd8ed32b41@git.kernel.org \
--to=tipbot@zytor.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=adrian.hunter@intel.com \
--cc=ak@linux.intel.com \
--cc=hpa@zytor.com \
--cc=jolsa@kernel.org \
--cc=jolsa@redhat.com \
--cc=kan.liang@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mpetlan@redhat.com \
--cc=namhyung@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