public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Ramkumar Ramachandra <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, acme@redhat.com, hpa@zytor.com,
	mingo@kernel.org, jolsa@redhat.com, dsahern@gmail.com,
	tglx@linutronix.de, artagnon@gmail.com
Subject: [tip:perf/urgent] perf bench: Fix segfault at the end of an 'all' execution
Date: Mon, 14 Apr 2014 07:53:53 -0700	[thread overview]
Message-ID: <tip-5673872d4afd2584e075cf2b1adb2cccec46a0f3@git.kernel.org> (raw)
In-Reply-To: <1395964219-22173-4-git-send-email-artagnon@gmail.com>

Commit-ID:  5673872d4afd2584e075cf2b1adb2cccec46a0f3
Gitweb:     http://git.kernel.org/tip/5673872d4afd2584e075cf2b1adb2cccec46a0f3
Author:     Ramkumar Ramachandra <artagnon@gmail.com>
AuthorDate: Thu, 27 Mar 2014 19:50:19 -0400
Committer:  Jiri Olsa <jolsa@redhat.com>
CommitDate: Mon, 14 Apr 2014 12:55:53 +0200

perf bench: Fix segfault at the end of an 'all' execution

At the end of

  $ perf bench all

the program segfaults because it attempts to dereference a NULL
pointer. Fix this fault.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/r/1395964219-22173-4-git-send-email-artagnon@gmail.com
Signed-off-by: Jiri Olsa <jolsa@redhat.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)
 {

  reply	other threads:[~2014-04-14 14:54 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 ` [PATCH 3/3] perf bench: Fix segfault at the end of an 'all' execution Ramkumar Ramachandra
2014-04-14 14:53   ` tip-bot for Ramkumar Ramachandra [this message]
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=tip-5673872d4afd2584e075cf2b1adb2cccec46a0f3@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=acme@redhat.com \
    --cc=artagnon@gmail.com \
    --cc=dsahern@gmail.com \
    --cc=hpa@zytor.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    /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