diff options
| author | Ingo Molnar <mingo@kernel.org> | 2021-02-17 14:04:39 +0100 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2021-02-17 14:04:39 +0100 |
| commit | ed3cd45f8ca873dd320ff7e6b4c1c8f83a65302c (patch) | |
| tree | 783a02c1e78964654fe6d9a9c14b24bfc50e6b3b /kernel/bpf/syscall.c | |
| parent | bae4ec13640b0915e7dd86da7e65c5d085160571 (diff) | |
| parent | f40ddce88593482919761f74910f42f4b84c004b (diff) | |
Merge tag 'v5.11' into sched/core, to pick up fixes & refresh the branch
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/bpf/syscall.c')
| -rw-r--r-- | kernel/bpf/syscall.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c index 4caf06fe4152..e5999d86c76e 100644 --- a/kernel/bpf/syscall.c +++ b/kernel/bpf/syscall.c @@ -17,7 +17,6 @@ #include <linux/fs.h> #include <linux/license.h> #include <linux/filter.h> -#include <linux/version.h> #include <linux/kernel.h> #include <linux/idr.h> #include <linux/cred.h> @@ -2713,7 +2712,6 @@ out_unlock: out_put_prog: if (tgt_prog_fd && tgt_prog) bpf_prog_put(tgt_prog); - bpf_prog_put(prog); return err; } @@ -2826,7 +2824,10 @@ static int bpf_raw_tracepoint_open(const union bpf_attr *attr) tp_name = prog->aux->attach_func_name; break; } - return bpf_tracing_prog_attach(prog, 0, 0); + err = bpf_tracing_prog_attach(prog, 0, 0); + if (err >= 0) + return err; + goto out_put_prog; case BPF_PROG_TYPE_RAW_TRACEPOINT: case BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE: if (strncpy_from_user(buf, |
