Skip to content

Commit 1a71476

Browse files
ffainelliacmel
authored andcommitted
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 <[email protected]> Acked-by: Alexei Starovoitov <[email protected]> Acked-by: Wang Nan <[email protected]> Cc: Jiri Olsa <[email protected]> Fixes: 8f9e05f ("perf tools: Fix PowerPC native building") Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent a431d67 commit 1a71476

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/build/feature/test-bpf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ int main(void)
3131
* Test existence of __NR_bpf and BPF_PROG_LOAD.
3232
* This call should fail if we run the testcase.
3333
*/
34-
return syscall(__NR_bpf, BPF_PROG_LOAD, attr, sizeof(attr));
34+
return syscall(__NR_bpf, BPF_PROG_LOAD, &attr, sizeof(attr));
3535
}

0 commit comments

Comments
 (0)