diff options
| author | Thiébaud Weksteen <tweek@google.com> | 2026-06-18 14:09:33 +1000 |
|---|---|---|
| committer | Alexei Starovoitov <ast@kernel.org> | 2026-06-21 18:09:07 -0700 |
| commit | 8405c4626460503027461652f96d8bb10c2a9173 (patch) | |
| tree | e33396235789ef2fe48e9138e5daba371be0b737 /kernel | |
| parent | 0dfcb68a6a5ac517b22dff6a1f01cb4f126dfc57 (diff) | |
| download | linux-next-8405c4626460503027461652f96d8bb10c2a9173.tar.gz linux-next-8405c4626460503027461652f96d8bb10c2a9173.zip | |
bpf: Fix BPF_PROG_ASSOC_STRUCT_OPS last field check
When struct prog_assoc_struct_ops was added,
BPF_PROG_ASSOC_STRUCT_OPS_LAST_FIELD referenced prog_fd instead of the
actual last field, flags.
Fixes: b5709f6d26d6 ("bpf: Support associating BPF program with struct_ops")
Signed-off-by: Thiébaud Weksteen <tweek@google.com>
Reviewed-by: Jakub Sitnicki <jakub@cloudflare.com>
Acked-by: Yonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/r/20260618040934.4113938-1-tweek@google.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/bpf/syscall.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c index b44106c8ea75..6db306d23b47 100644 --- a/kernel/bpf/syscall.c +++ b/kernel/bpf/syscall.c @@ -6308,7 +6308,7 @@ static int prog_stream_read(union bpf_attr *attr) return ret; } -#define BPF_PROG_ASSOC_STRUCT_OPS_LAST_FIELD prog_assoc_struct_ops.prog_fd +#define BPF_PROG_ASSOC_STRUCT_OPS_LAST_FIELD prog_assoc_struct_ops.flags static int prog_assoc_struct_ops(union bpf_attr *attr) { |
