linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: tip-bot for Florian Fainelli <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: ast@kernel.org, mingo@kernel.org, linux-kernel@vger.kernel.org,
	acme@redhat.com, tglx@linutronix.de, f.fainelli@gmail.com,
	jolsa@kernel.org, wangnan0@huawei.com, hpa@zytor.com
Subject: [tip:perf/core] bpf tools: Fix syscall argument
Date: Sun, 1 May 2016 00:37:14 -0700	[thread overview]
Message-ID: <tip-1a71476e4f2693ed93523c80ff1e2d4a8634717c@git.kernel.org> (raw)
In-Reply-To: <1461551694-5512-3-git-send-email-f.fainelli@gmail.com>

Commit-ID:  1a71476e4f2693ed93523c80ff1e2d4a8634717c
Gitweb:     http://git.kernel.org/tip/1a71476e4f2693ed93523c80ff1e2d4a8634717c
Author:     Florian Fainelli <f.fainelli@gmail.com>
AuthorDate: Sun, 24 Apr 2016 19:34:54 -0700
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Thu, 28 Apr 2016 09:58:57 -0300

bpf tools: Fix syscall argument

Coverity flagged this under CID 1354884 as a sizeof mismatch, it turns
out that the argument "attr" passed to syscall should have been a
pointer to attr in the first place.

Reported-by: coverity (CID 1354884)
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Wang Nan <wangnan0@huawei.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Fixes: 8f9e05fb298f ("perf tools: Fix PowerPC native building")
Link: http://lkml.kernel.org/r/1461551694-5512-3-git-send-email-f.fainelli@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/build/feature/test-bpf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/build/feature/test-bpf.c b/tools/build/feature/test-bpf.c
index 8236df9..e04ab89 100644
--- a/tools/build/feature/test-bpf.c
+++ b/tools/build/feature/test-bpf.c
@@ -31,5 +31,5 @@ int main(void)
 	 * Test existence of __NR_bpf and BPF_PROG_LOAD.
 	 * This call should fail if we run the testcase.
 	 */
-	return syscall(__NR_bpf, BPF_PROG_LOAD, attr, sizeof(attr));
+	return syscall(__NR_bpf, BPF_PROG_LOAD, &attr, sizeof(attr));
 }

  parent reply	other threads:[~2016-05-01  7:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-25  2:34 [PATCH 0/2] bfp tools: Couple Coverity fixes Florian Fainelli
2016-04-25  2:34 ` [PATCH 1/2] bfp tools: Remove expression with no effect Florian Fainelli
2016-04-27  3:11   ` Wangnan (F)
2016-04-27 14:33     ` Arnaldo Carvalho de Melo
2016-05-01  7:36   ` [tip:perf/core] bpf " tip-bot for Florian Fainelli
2016-04-25  2:34 ` [PATCH 2/2] bfp tools: Fix syscall argument Florian Fainelli
2016-04-27  3:01   ` Wangnan (F)
2016-04-27 14:34     ` Arnaldo Carvalho de Melo
2016-05-01  7:37   ` tip-bot for Florian Fainelli [this message]
2016-04-27  2:46 ` [PATCH 0/2] bfp tools: Couple Coverity fixes Florian Fainelli
2016-04-27  3:00   ` Wangnan (F)
2016-04-27  3:08     ` Alexei Starovoitov
2016-04-27 14:24       ` Arnaldo Carvalho de Melo

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-1a71476e4f2693ed93523c80ff1e2d4a8634717c@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=acme@redhat.com \
    --cc=ast@kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=hpa@zytor.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=wangnan0@huawei.com \
    /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;
as well as URLs for NNTP newsgroup(s).