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)
commit609320c8a22715b74b39796930c3542719f8ab62
tree35b1ec2606bd443edd2988c353ee7c4de6bb0748
parentc6644d07eff6588b2dedf881279fb0d1c7783970
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