From: Ramkumar Ramachandra <artagnon@gmail.com>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>, David Ahern <dsahern@gmail.com>,
Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH 3/3] perf bench: Fix segfault at the end of an 'all' execution
Date: Thu, 27 Mar 2014 19:50:19 -0400 [thread overview]
Message-ID: <1395964219-22173-4-git-send-email-artagnon@gmail.com> (raw)
In-Reply-To: <1395964219-22173-1-git-send-email-artagnon@gmail.com>
At the end of
$ perf bench all
the program segfaults because it attempts to dereference a NULL
pointer. Fix this fault.
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
---
tools/perf/builtin-bench.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/builtin-bench.c b/tools/perf/builtin-bench.c
index f600b74..1e6e777 100644
--- a/tools/perf/builtin-bench.c
+++ b/tools/perf/builtin-bench.c
@@ -86,7 +86,7 @@ static struct collection collections[] = {
/* Iterate over all benchmarks within a collection: */
#define for_each_bench(coll, bench) \
- for (bench = coll->benchmarks; bench->name; bench++)
+ for (bench = coll->benchmarks; bench && bench->name; bench++)
static void dump_benchmarks(struct collection *coll)
{
--
1.9.0.431.g014438b
next prev parent reply other threads:[~2014-03-27 23:49 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-27 23:50 [PATCH 0/3] Minor fixes around perf bench Ramkumar Ramachandra
2014-03-27 23:50 ` [PATCH 1/3] perf bench: Set more defaults in the 'numa' suite Ramkumar Ramachandra
2014-04-09 12:16 ` Jiri Olsa
2014-04-11 0:31 ` Ramkumar Ramachandra
2014-04-11 10:33 ` Jiri Olsa
2014-04-14 14:54 ` [tip:perf/urgent] " tip-bot for Ramkumar Ramachandra
2014-03-27 23:50 ` [PATCH 2/3] perf bench: Update manpage to mention numa and futex Ramkumar Ramachandra
2014-04-14 14:53 ` [tip:perf/urgent] " tip-bot for Ramkumar Ramachandra
2014-03-27 23:50 ` Ramkumar Ramachandra [this message]
2014-04-14 14:53 ` [tip:perf/urgent] perf bench: Fix segfault at the end of an 'all' execution tip-bot for Ramkumar Ramachandra
2014-03-27 23:57 ` [PATCH 0/3] Minor fixes around perf bench Davidlohr Bueso
2014-04-06 14:23 ` Jiri Olsa
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=1395964219-22173-4-git-send-email-artagnon@gmail.com \
--to=artagnon@gmail.com \
--cc=acme@redhat.com \
--cc=dsahern@gmail.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.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