From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sowmini Varadhan Subject: [PATCHv2 RFC net-next] net/vxlan: Fix kernel unaligned access in __vxlan_find_mac Date: Fri, 17 Jul 2015 22:00:31 +0200 Message-ID: <20150717200031.GB30336@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: sowmini.varadhan@oracle.com, alexander.duyck@gmail.com, davem@davemloft.net To: netdev@vger.kernel.org Return-path: Received: from userp1040.oracle.com ([156.151.31.81]:39146 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751893AbbGQUAu (ORCPT ); Fri, 17 Jul 2015 16:00:50 -0400 Content-Disposition: inline Sender: netdev-owner@vger.kernel.org List-ID: __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 --- v2: Alexander Duyck comments: make eth_addr[] 64b aligned. drivers/net/vxlan.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index 34c519e..ec86a11 100644 --- a/drivers/net/vxlan.c +++ b/drivers/net/vxlan.c @@ -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 */ -- 1.7.1