diff options
author | Ingo Molnar <mingo@kernel.org> | 2016-11-13 08:16:40 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2016-11-13 08:16:40 +0100 |
commit | 74239ac259519a98f4c32439326afe7e7eb64459 (patch) | |
tree | a3e9a1ae0dc6634e7aa669c8881e425634094257 /net/packet/af_packet.c | |
parent | a75dcb5848359f488c32c0aef8711d9bd37a77b8 (diff) | |
parent | 86e4ee760ef2f7571e233a3abf065ffd0bb4089d (diff) | |
download | linux-74239ac259519a98f4c32439326afe7e7eb64459.tar.gz |
Merge branch 'linus' into efi/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'net/packet/af_packet.c')
-rw-r--r-- | net/packet/af_packet.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index 11db0d619c00..d2238b204691 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c @@ -250,7 +250,7 @@ static void __fanout_link(struct sock *sk, struct packet_sock *po); static int packet_direct_xmit(struct sk_buff *skb) { struct net_device *dev = skb->dev; - netdev_features_t features; + struct sk_buff *orig_skb = skb; struct netdev_queue *txq; int ret = NETDEV_TX_BUSY; @@ -258,9 +258,8 @@ static int packet_direct_xmit(struct sk_buff *skb) !netif_carrier_ok(dev))) goto drop; - features = netif_skb_features(skb); - if (skb_needs_linearize(skb, features) && - __skb_linearize(skb)) + skb = validate_xmit_skb_list(skb, dev); + if (skb != orig_skb) goto drop; txq = skb_get_tx_queue(dev, skb); @@ -280,7 +279,7 @@ static int packet_direct_xmit(struct sk_buff *skb) return ret; drop: atomic_long_inc(&dev->tx_dropped); - kfree_skb(skb); + kfree_skb_list(skb); return NET_XMIT_DROP; } |