netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] vxlan: fix a free after use
@ 2014-10-17  6:06 roy.qing.li
  2014-10-17 20:24 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: roy.qing.li @ 2014-10-17  6:06 UTC (permalink / raw)
  To: netdev; +Cc: edumazet

From: Li RongQing <roy.qing.li@gmail.com>

pskb_may_pull maybe change skb->data and make eth pointer oboslete,
so eth needs to reload

Fixes: 91269e390d062 ("vxlan: using pskb_may_pull as early as possible")
Cc: Eric Dumazet <edumazet@google.com>
Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
---
 drivers/net/vxlan.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index 855a81d..fabd514 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -1885,6 +1885,7 @@ static netdev_tx_t vxlan_xmit(struct sk_buff *skb, struct net_device *dev)
 				    msg->icmph.icmp6_type == NDISC_NEIGHBOUR_SOLICITATION)
 					return neigh_reduce(dev, skb);
 		}
+		eth = eth_hdr(skb);
 #endif
 	}
 
-- 
1.7.10.4

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

end of thread, other threads:[~2014-10-17 20:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-17  6:06 [PATCH v2] vxlan: fix a free after use roy.qing.li
2014-10-17 20:24 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).