]> git.baikalelectronics.ru Git - kernel.git/commit
perf/bpf: fix a clang compilation issue
authorYonghong Song <yhs@fb.com>
Fri, 8 Sep 2017 01:36:15 +0000 (18:36 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 11 Sep 2017 21:28:45 +0000 (14:28 -0700)
commit09916861d2eb10242a002a528a5f68e8b0d90ef0
tree35b1ec2606bd443edd2988c353ee7c4de6bb0748
parent0d964c673c6598b09144adba717541c302e9f63b
perf/bpf: fix a clang compilation issue

clang does not support variable length array for structure member.
It has the following error during compilation:

kernel/trace/trace_syscalls.c:568:17: error: fields must have a constant size:
'variable length array in structure' extension will never be supported
                unsigned long args[sys_data->nb_args];
                              ^

The fix is to use a fixed array length instead.

Reported-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/syscalls.h
kernel/trace/trace_syscalls.c