From: Arnd Bergmann Date: Tue, 6 Sep 2016 13:10:22 +0000 (+0200) Subject: perf, bpf: fix conditional call to bpf_overflow_handler X-Git-Tag: MMI-PSA29.97-13-9~7063^2~275 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f1e4ba5b6a6555d1f6b174d4fd0a96a9363bb57f;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 Fixes: aa6a5f3cb2b2 ("perf, bpf: add perf events core support for BPF_PROG_TYPE_PERF_EVENT programs") Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller --- diff --git a/kernel/events/core.c b/kernel/events/core.c index 85bf4c37911f..a7b8c1c75fa7 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -9072,7 +9072,7 @@ perf_event_alloc(struct perf_event_attr *attr, int cpu, if (!overflow_handler && parent_event) { overflow_handler = parent_event->overflow_handler; context = parent_event->overflow_handler_context; -#ifdef CONFIG_BPF_SYSCALL +#if defined(CONFIG_BPF_SYSCALL) && defined(CONFIG_EVENT_TRACING) if (overflow_handler == bpf_overflow_handler) { struct bpf_prog *prog = bpf_prog_inc(parent_event->prog);