]> git.baikalelectronics.ru Git - kernel.git/commit
perf, bpf: fix conditional call to bpf_overflow_handler
authorArnd Bergmann <arnd@arndb.de>
Tue, 6 Sep 2016 13:10:22 +0000 (15:10 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 6 Sep 2016 23:34:14 +0000 (16:34 -0700)
commit516e1751dd36923c2030f86ea51d7156e56b6d87
treece25127a5cf8b1ca5bda066c785fe1892a65152e
parentea1cf10bdc509962a27a2f317aaec32692dac65d
perf, bpf: fix conditional call to bpf_overflow_handler

The newly added bpf_overflow_handler function is only built of both
CONFIG_EVENT_TRACING and CONFIG_BPF_SYSCALL are enabled, but the caller
only checks the latter:

kernel/events/core.c: In function 'perf_event_alloc':
kernel/events/core.c:9106:27: error: 'bpf_overflow_handler' undeclared (first use in this function)

This changes the caller so we also skip this call if CONFIG_EVENT_TRACING
is disabled entirely.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 37856c5f9664 ("perf, bpf: add perf events core support for BPF_PROG_TYPE_PERF_EVENT programs")
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
kernel/events/core.c