public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] include: linux: Fix flex array member not at the end in bpf_empty_prog_array
@ 2024-09-30 18:16 Philipp Hortmann
  2024-10-04  1:54 ` Gustavo A. R. Silva
  2024-10-06 14:55 ` kernel test robot
  0 siblings, 2 replies; 3+ messages in thread
From: Philipp Hortmann @ 2024-09-30 18:16 UTC (permalink / raw)
  To: Gustavo A . R . Silva, Andrew Morton, Greg Kroah-Hartman,
	Christian Brauner, Jakub Kicinski, linux-kernel
  Cc: Philipp Hortmann

Struct bpf_prog_array has a flex array member at the end and needs
therefore to be last in struct bpf_empty_prog_array.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
 include/linux/bpf.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/bpf.h b/include/linux/bpf.h
index 19d8ca8ac960..1ce319045048 100644
--- a/include/linux/bpf.h
+++ b/include/linux/bpf.h
@@ -2018,8 +2018,8 @@ struct bpf_prog_array {
 };
 
 struct bpf_empty_prog_array {
-	struct bpf_prog_array hdr;
 	struct bpf_prog *null_prog;
+	struct bpf_prog_array hdr;
 };
 
 /* to avoid allocating empty bpf_prog_array for cgroups that
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-10-06 14:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-30 18:16 [PATCH] include: linux: Fix flex array member not at the end in bpf_empty_prog_array Philipp Hortmann
2024-10-04  1:54 ` Gustavo A. R. Silva
2024-10-06 14:55 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox