Skip to contentSkip to conversation

net/vxlan: Fix kernel unaligned access in __vxlan_find_mac

PATCH Applied Sowmini Varadhan 4 participants 4 messages Jul 20, 2015 – Jul 21, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 net/vxlan: Fix kernel unaligned access in __vxlan_find_mac

__vxlan_find_mac invokes ether_addr_equal on the eth_addr field, which triggers unaligned access messages, so rearrange vxlan_fdb to avoid this in the most non-intrusive way.

---
v2: Alexander Duyck comments: place eth_addr[] to be 64b aligned

 drivers/net/vxlan.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/vxlan.c +1 -1
index 34c519e..ec86a11 100644
@@ -106,9 +106,9 @@ struct vxlan_fdb {
 	unsigned long	  updated;	/* jiffies */
 	unsigned long	  used;
 	struct list_head  remotes;
+	u8		  eth_addr[ETH_ALEN];
 	u16		  state;	/* see ndm_state */
 	u8		  flags;	/* see ndm_flags */
-	u8		  eth_addr[ETH_ALEN];
 };
 
 /* Pseudo network device */
Signature · 1 line
1.7.1