[<prev] [next>] [day] [month] [year] [list]
Message-ID: <tip-iqg98sfn4fvwcxp0pdvqauie@git.kernel.org>
Date: Wed, 12 Aug 2015 05:30:13 -0700
From: tip-bot for Arnaldo Carvalho de Melo <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: hpa@...or.com, acme@...hat.com, namhyung@...nel.org,
mingo@...nel.org, adrian.hunter@...el.com, bp@...e.de,
eranian@...gle.com, jolsa@...hat.com, tglx@...utronix.de,
linux-kernel@...r.kernel.org, dsahern@...il.com, fweisbec@...il.com
Subject: [tip:perf/core] perf hists: hist_entry__cmp()
may use he_tmp.hists, initialize it
Commit-ID: 5cef897652f224442c013d9e9425536b38385351
Gitweb: http://git.kernel.org/tip/5cef897652f224442c013d9e9425536b38385351
Author: Arnaldo Carvalho de Melo <acme@...hat.com>
AuthorDate: Mon, 10 Aug 2015 15:45:55 -0300
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Mon, 10 Aug 2015 17:01:00 -0300
perf hists: hist_entry__cmp() may use he_tmp.hists, initialize it
The iter_add_next_cumulative_entry() function calls hist_entry__cmp(),
which may want to access the hists where this hist_entry is stored,
initialize it to let that happen and avoid segfaults.
Cc: Adrian Hunter <adrian.hunter@...el.com>
Cc: Borislav Petkov <bp@...e.de>
Cc: David Ahern <dsahern@...il.com>
Cc: Frederic Weisbecker <fweisbec@...il.com>
Cc: Jiri Olsa <jolsa@...hat.com>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Stephane Eranian <eranian@...gle.com>
Link: http://lkml.kernel.org/n/tip-iqg98sfn4fvwcxp0pdvqauie@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
tools/perf/util/hist.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index a6e9ddd..2fe6ea3 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -761,6 +761,7 @@ iter_add_next_cumulative_entry(struct hist_entry_iter *iter,
struct hist_entry **he_cache = iter->priv;
struct hist_entry *he;
struct hist_entry he_tmp = {
+ .hists = evsel__hists(evsel),
.cpu = al->cpu,
.thread = al->thread,
.comm = thread__comm(al->thread),
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists