From: furat.afram@gmail.com
To: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Paul Mackerras <paulus@samba.org>,
linux-kernel@vger.kernel.org
Cc: Furat Afram <furat.afram@gmail.com>
Subject: [PATCH 1/1] perf probe:fix sigsegv in adding nonexistent event
Date: Tue, 25 Oct 2011 20:39:05 -0700 [thread overview]
Message-ID: <1319600345-29311-1-git-send-email-furat.afram@gmail.com> (raw)
From: Furat Afram <furat.afram@gmail.com>
pref probe crashes when trying to add nonexistent event
Signed-off-by: Furat Afram <furat.afram@gmail.com>
---
tools/perf/util/symbol.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index 40eeaf0..ad0c79b 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -636,14 +636,18 @@ static int dso__load_all_kallsyms(struct dso *dso, const char *filename,
static int dso__split_kallsyms(struct dso *dso, struct map *map,
symbol_filter_t filter)
{
- struct map_groups *kmaps = map__kmap(map)->kmaps;
- struct machine *machine = kmaps->machine;
+ struct map_groups *kmaps;
+ struct machine *machine;
struct map *curr_map = map;
struct symbol *pos;
int count = 0, moved = 0;
struct rb_root *root = &dso->symbols[map->type];
struct rb_node *next = rb_first(root);
int kernel_range = 0;
+ kmaps = map__kmap(map)->kmaps;
+ if (kmaps == NULL)
+ return -1;
+ machine = kmaps->machine;
while (next) {
char *module;
--
1.7.6.4
next reply other threads:[~2011-10-26 3:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-26 3:39 furat.afram [this message]
2011-10-26 17:01 ` Arnaldo Carvalho de Melo
2011-10-27 0:48 ` Furat Afram
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=1319600345-29311-1-git-send-email-furat.afram@gmail.com \
--to=furat.afram@gmail.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@ghostprotocols.net \
--cc=linux-kernel@vger.kernel.org \
--cc=paulus@samba.org \
/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