* [PATCH] bpf: Fix BPF_PROG_ASSOC_STRUCT_OPS last field check
@ 2026-06-18 4:09 Thiébaud Weksteen
2026-06-18 9:58 ` Jakub Sitnicki
0 siblings, 1 reply; 2+ messages in thread
From: Thiébaud Weksteen @ 2026-06-18 4:09 UTC (permalink / raw)
To: bpf; +Cc: Daniel Borkmann, Alexei Starovoitov, Thiébaud Weksteen
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>
---
kernel/bpf/syscall.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c
index 630d530782fe..eb52ba57ffd5 100644
--- a/kernel/bpf/syscall.c
+++ b/kernel/bpf/syscall.c
@@ -6189,7 +6189,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)
{
--
2.54.0.1189.g8c84645362-goog
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-06-18 9:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-18 4:09 [PATCH] bpf: Fix BPF_PROG_ASSOC_STRUCT_OPS last field check Thiébaud Weksteen
2026-06-18 9:58 ` Jakub Sitnicki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox