diff options
author | David S. Miller <davem@davemloft.net> | 2015-06-09 06:06:56 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-06-09 06:06:56 +0300 |
commit | 941742f49762ba4c908510f036b09a46c1b14513 (patch) | |
tree | aafb7a72c2072f98889406668003234bed56df02 /net/core | |
parent | ac7ba51c215db5739eb640f2f26025ced8668285 (diff) | |
parent | 5879ae5fd052a63d5ac0684320cb7df3e83da7de (diff) | |
download | linux-941742f49762ba4c908510f036b09a46c1b14513.tar.xz |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/dev.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 0602e917a305..6778a9999d52 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -1723,15 +1723,8 @@ EXPORT_SYMBOL_GPL(is_skb_forwardable); int __dev_forward_skb(struct net_device *dev, struct sk_buff *skb) { - if (skb_shinfo(skb)->tx_flags & SKBTX_DEV_ZEROCOPY) { - if (skb_copy_ubufs(skb, GFP_ATOMIC)) { - atomic_long_inc(&dev->rx_dropped); - kfree_skb(skb); - return NET_RX_DROP; - } - } - - if (unlikely(!is_skb_forwardable(dev, skb))) { + if (skb_orphan_frags(skb, GFP_ATOMIC) || + unlikely(!is_skb_forwardable(dev, skb))) { atomic_long_inc(&dev->rx_dropped); kfree_skb(skb); return NET_RX_DROP; |