Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754630Ab2FFHIZ (ORCPT ); Wed, 6 Jun 2012 03:08:25 -0400 Received: from terminus.zytor.com ([198.137.202.10]:35941 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753962Ab2FFHIX (ORCPT ); Wed, 6 Jun 2012 03:08:23 -0400 Date: Wed, 6 Jun 2012 00:07:53 -0700 From: tip-bot for Srikar Dronamraju Message-ID: Cc: acme@redhat.com, linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org, torvalds@linux-foundation.org, peterz@infradead.org, ananth@in.ibm.com, anton@redhat.com, masami.hiramatsu.pt@hitachi.com, rostedt@goodmis.org, acme@infradead.org, srikar@linux.vnet.ibm.com, oleg@redhat.com, tglx@linutronix.de Reply-To: mingo@kernel.org, hpa@zytor.com, linux-kernel@vger.kernel.org, acme@redhat.com, torvalds@linux-foundation.org, peterz@infradead.org, ananth@in.ibm.com, anton@redhat.com, masami.hiramatsu.pt@hitachi.com, acme@infradead.org, rostedt@goodmis.org, srikar@linux.vnet.ibm.com, tglx@linutronix.de, oleg@redhat.com In-Reply-To: <20120531114656.23691.54223.sendpatchset@srdronam.in.ibm.com> References: <20120531114656.23691.54223.sendpatchset@srdronam.in.ibm.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/urgent] perf symbols: Check for valid dso before creating map Git-Commit-ID: 378474e4b23183002f1791b294a4440b6b7df36a 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 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.6 (terminus.zytor.com [127.0.0.1]); Wed, 06 Jun 2012 00:07:59 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1879 Lines: 48 Commit-ID: 378474e4b23183002f1791b294a4440b6b7df36a Gitweb: http://git.kernel.org/tip/378474e4b23183002f1791b294a4440b6b7df36a Author: Srikar Dronamraju AuthorDate: Thu, 31 May 2012 17:16:56 +0530 Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 31 May 2012 12:08:22 -0300 perf symbols: Check for valid dso before creating map dso__new() can return NULL. Hence verify dso before creating a new map. Signed-off-by: Srikar Dronamraju Suggested-by: Arnaldo Carvalho de Melo Cc: Ananth N Mavinakayanahalli Cc: Anton Arapov Cc: Linus Torvalds Cc: Masami Hiramatsu Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20120531114656.23691.54223.sendpatchset@srdronam.in.ibm.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/symbol.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index 9d04dcd..3e2e5ea 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c @@ -2817,8 +2817,11 @@ int machine__load_vmlinux_path(struct machine *machine, enum map_type type, struct map *dso__new_map(const char *name) { + struct map *map = NULL; struct dso *dso = dso__new(name); - struct map *map = map__new2(0, dso, MAP__FUNCTION); + + if (dso) + map = map__new2(0, dso, MAP__FUNCTION); return map; } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/