From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754676AbbHLMaa (ORCPT ); Wed, 12 Aug 2015 08:30:30 -0400 Received: from terminus.zytor.com ([198.137.202.10]:42443 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751072AbbHLMa2 (ORCPT ); Wed, 12 Aug 2015 08:30:28 -0400 Date: Wed, 12 Aug 2015 05:30:13 -0700 From: tip-bot for Arnaldo Carvalho de Melo Message-ID: Cc: hpa@zytor.com, acme@redhat.com, namhyung@kernel.org, mingo@kernel.org, adrian.hunter@intel.com, bp@suse.de, eranian@google.com, jolsa@redhat.com, tglx@linutronix.de, linux-kernel@vger.kernel.org, dsahern@gmail.com, fweisbec@gmail.com Reply-To: linux-kernel@vger.kernel.org, dsahern@gmail.com, fweisbec@gmail.com, tglx@linutronix.de, jolsa@redhat.com, eranian@google.com, bp@suse.de, mingo@kernel.org, namhyung@kernel.org, adrian.hunter@intel.com, acme@redhat.com, hpa@zytor.com To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf hists: hist_entry__cmp() may use he_tmp.hists, initialize it Git-Commit-ID: 5cef897652f224442c013d9e9425536b38385351 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 5cef897652f224442c013d9e9425536b38385351 Gitweb: http://git.kernel.org/tip/5cef897652f224442c013d9e9425536b38385351 Author: Arnaldo Carvalho de Melo AuthorDate: Mon, 10 Aug 2015 15:45:55 -0300 Committer: Arnaldo Carvalho de Melo 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 Cc: Borislav Petkov Cc: David Ahern Cc: Frederic Weisbecker Cc: Jiri Olsa Cc: Namhyung Kim Cc: Stephane Eranian Link: http://lkml.kernel.org/n/tip-iqg98sfn4fvwcxp0pdvqauie@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- 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),