Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1477359
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH, net-next] perf, bpf: fix conditional call to bpf_overflow_handler |
| Date | 2016-09-06 15:20 +0200 |
| Message-ID | <seos9-2uF-19@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
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: aa6a5f3cb2b2 ("perf, bpf: add perf events core support for BPF_PROG_TYPE_PERF_EVENT programs")
---
kernel/events/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
I'm not entirely sure if this is the correct solution, please check before applying
diff --git a/kernel/events/core.c b/kernel/events/core.c
index 73d0c6ddfd5b..d3f6374326d8 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -9110,7 +9110,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);
--
2.9.0
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH, net-next] perf, bpf: fix conditional call to bpf_overflow_handler Arnd Bergmann <arnd@arndb.de> - 2016-09-06 15:20 +0200
Re: [PATCH, net-next] perf, bpf: fix conditional call to bpf_overflow_handler Alexei Starovoitov <alexei.starovoitov@gmail.com> - 2016-09-06 17:40 +0200
Re: [PATCH, net-next] perf, bpf: fix conditional call to bpf_overflow_handler Ingo Molnar <mingo@kernel.org> - 2016-09-08 08:40 +0200
Re: [PATCH, net-next] perf, bpf: fix conditional call to bpf_overflow_handler Peter Zijlstra <peterz@infradead.org> - 2016-09-08 09:00 +0200
Re: [PATCH, net-next] perf, bpf: fix conditional call to bpf_overflow_handler Ingo Molnar <mingo@kernel.org> - 2016-09-08 09:10 +0200
Re: [PATCH, net-next] perf, bpf: fix conditional call to bpf_overflow_handler Daniel Borkmann <daniel@iogearbox.net> - 2016-09-08 10:10 +0200
Re: [PATCH, net-next] perf, bpf: fix conditional call to bpf_overflow_handler Ingo Molnar <mingo@kernel.org> - 2016-09-08 11:50 +0200
csiph-web