Skip to content

Commit 7177a3b

Browse files
sowminivdavem330
authored andcommitted
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. Signed-off-by: Sowmini Varadhan <[email protected]> Reviewed-by: Jiri Pirko <[email protected]> Reviewed-by: Marcelo Ricardo Leitner <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 685a015 commit 7177a3b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/vxlan.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@ struct vxlan_fdb {
106106
unsigned long updated; /* jiffies */
107107
unsigned long used;
108108
struct list_head remotes;
109+
u8 eth_addr[ETH_ALEN];
109110
u16 state; /* see ndm_state */
110111
u8 flags; /* see ndm_flags */
111-
u8 eth_addr[ETH_ALEN];
112112
};
113113

114114
/* Pseudo network device */

0 commit comments

Comments
 (0)