Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752718AbcD0DCY (ORCPT ); Tue, 26 Apr 2016 23:02:24 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:13889 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751710AbcD0DCX (ORCPT ); Tue, 26 Apr 2016 23:02:23 -0400 Subject: Re: [PATCH 2/2] bfp tools: Fix syscall argument To: Florian Fainelli , , References: <1461551694-5512-1-git-send-email-f.fainelli@gmail.com> <1461551694-5512-3-git-send-email-f.fainelli@gmail.com> CC: , From: "Wangnan (F)" Message-ID: <57202B97.3010809@huawei.com> Date: Wed, 27 Apr 2016 11:01:43 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: <1461551694-5512-3-git-send-email-f.fainelli@gmail.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.111.66.109] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090202.57202BBB.0028,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: cd99a20ec51c17c1bd816971feb1f232 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1017 Lines: 26 On 2016/4/25 10:34, Florian Fainelli wrote: > 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) > Fixes: 8f9e05fb298f ("perf tools: Fix PowerPC native building") > Signed-off-by: Florian Fainelli > --- > 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 8236df9a46ca..e04ab89a1013 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)); > } Acked-by: Wang Nan