diff options
author | Eric Dumazet <edumazet@google.com> | 2017-08-30 10:32:58 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-08-30 15:56:16 -0700 |
commit | 62f3250f3d18ea7d4b4e51ac98cdca29515683a5 (patch) | |
tree | 3478c44d186ddd3424ec6ec59634ee0c925e380e /drivers/net/xen-netfront.c | |
parent | 90774a93ef075b39e55d31fe56fc286d71a046ac (diff) | |
download | linux-62f3250f3d18ea7d4b4e51ac98cdca29515683a5.tar.gz linux-62f3250f3d18ea7d4b4e51ac98cdca29515683a5.tar.bz2 linux-62f3250f3d18ea7d4b4e51ac98cdca29515683a5.zip |
xen-netfront: be more drop monitor friendly
xennet_start_xmit() might copy skb with inappropriate layout
into a fresh one.
Old skb is freed, and at this point it is not a drop, but
a consume. New skb will then be either consumed or dropped.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/xen-netfront.c')
-rw-r--r-- | drivers/net/xen-netfront.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c index 7b61adb6270c..523387e71a80 100644 --- a/drivers/net/xen-netfront.c +++ b/drivers/net/xen-netfront.c @@ -611,7 +611,7 @@ static int xennet_start_xmit(struct sk_buff *skb, struct net_device *dev) nskb = skb_copy(skb, GFP_ATOMIC); if (!nskb) goto drop; - dev_kfree_skb_any(skb); + dev_consume_skb_any(skb); skb = nskb; page = virt_to_page(skb->data); offset = offset_in_page(skb->data); |