Re: [PATCH] neighbour: Fix __randomize_layout crash in struct neighbour

From: Gustavo A. R. Silva
Date: Tue Nov 28 2023 - 15:12:18 EST



diff --git a/include/net/neighbour.h b/include/net/neighbour.h
index 07022bb0d44d..0d28172193fa 100644
--- a/include/net/neighbour.h
+++ b/include/net/neighbour.h
@@ -162,7 +162,7 @@ struct neighbour {
struct rcu_head rcu;
struct net_device *dev;
netdevice_tracker dev_tracker;
- u8 primary_key[0];
+ u8 primary_key[];
} __randomize_layout;
struct neigh_ops {

Fixes the crash for me!

Awesome. :)

--
Gustavo