Commit aa214de0 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller
Browse files

net: l2tp_eth: fix l2tp_eth_dev_xmit race

Its illegal to dereference skb after giving it to l2tp_xmit_skb()
as it might be already freed/reused.
Signed-off-by: default avatarEric Dumazet <>
Cc: James Chapman <>
Signed-off-by: default avatarDavid S. Miller <>
parent 044ca2a5
...@@ -88,12 +88,12 @@ static int l2tp_eth_dev_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -88,12 +88,12 @@ static int l2tp_eth_dev_xmit(struct sk_buff *skb, struct net_device *dev)
struct l2tp_eth *priv = netdev_priv(dev); struct l2tp_eth *priv = netdev_priv(dev);
struct l2tp_session *session = priv->session; struct l2tp_session *session = priv->session;
l2tp_xmit_skb(session, skb, session->hdr_len);
dev->stats.tx_bytes += skb->len; dev->stats.tx_bytes += skb->len;
dev->stats.tx_packets++; dev->stats.tx_packets++;
return 0; l2tp_xmit_skb(session, skb, session->hdr_len);
return NETDEV_TX_OK;
} }
static struct net_device_ops l2tp_eth_netdev_ops = { static struct net_device_ops l2tp_eth_netdev_ops = {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment