mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tip-bot for Ravi Bangoria <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: acme@redhat.com, tglx@linutronix.de, peterz@infradead.org,
	ravi.bangoria@linux.vnet.ibm.com, mhiramat@kernel.org,
	alexander.shishkin@linux.intel.com, hpa@zytor.com,
	linux-kernel@vger.kernel.org, mingo@kernel.org
Subject: [tip:perf/core] perf probe: Fix concat_probe_trace_events
Date: Mon, 20 Mar 2017 23:53:37 -0700	[thread overview]
Message-ID: <tip-f0a30dca5f84fe8048271799b56677ac2279de66@git.kernel.org> (raw)
In-Reply-To: <20170308065908.4128-1-ravi.bangoria@linux.vnet.ibm.com>

Commit-ID:  f0a30dca5f84fe8048271799b56677ac2279de66
Gitweb:     http://git.kernel.org/tip/f0a30dca5f84fe8048271799b56677ac2279de66
Author:     Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
AuthorDate: Wed, 8 Mar 2017 12:29:07 +0530
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Mon, 20 Mar 2017 15:01:32 -0300

perf probe: Fix concat_probe_trace_events

'*ntevs' contains number of elements present in 'tevs' array. If there
are no elements in array, 'tevs2' can be directly assigned to 'tevs'
without allocating more space. So the condition should be  '*ntevs == 0'
not  'ntevs == 0'.

Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Fixes: 42bba263eb58 ("perf probe: Allow wildcard for cached events")
Link: http://lkml.kernel.org/r/20170308065908.4128-1-ravi.bangoria@linux.vnet.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/probe-event.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
index b19d178..6740d68 100644
--- a/tools/perf/util/probe-event.c
+++ b/tools/perf/util/probe-event.c
@@ -3048,7 +3048,7 @@ concat_probe_trace_events(struct probe_trace_event **tevs, int *ntevs,
 	struct probe_trace_event *new_tevs;
 	int ret = 0;
 
-	if (ntevs == 0) {
+	if (*ntevs == 0) {
 		*tevs = *tevs2;
 		*ntevs = ntevs2;
 		*tevs2 = NULL;

      parent reply	other threads:[~2017-03-21  7:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-08  6:59 [PATCH 1/2] " Ravi Bangoria
2017-03-08  6:59 ` [PATCH 2/2] perf probe: Remove stale func add_perf_probe_events Ravi Bangoria
2017-03-08  9:43   ` Masami Hiramatsu
2017-03-08  9:58     ` Ravi Bangoria
2017-03-08  8:37 ` [PATCH 1/2] perf probe: Fix concat_probe_trace_events Masami Hiramatsu
2017-03-20  9:33   ` Ravi Bangoria
2017-03-20 13:39     ` Arnaldo Carvalho de Melo
2017-03-21  6:53 ` tip-bot for Ravi Bangoria [this message]

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-f0a30dca5f84fe8048271799b56677ac2279de66@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=acme@redhat.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=ravi.bangoria@linux.vnet.ibm.com \
    --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

all inboxes | Powered by JetHome®