Commit 62f3250f authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller

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: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 90774a93
...@@ -611,7 +611,7 @@ static int xennet_start_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -611,7 +611,7 @@ static int xennet_start_xmit(struct sk_buff *skb, struct net_device *dev)
nskb = skb_copy(skb, GFP_ATOMIC); nskb = skb_copy(skb, GFP_ATOMIC);
if (!nskb) if (!nskb)
goto drop; goto drop;
dev_kfree_skb_any(skb); dev_consume_skb_any(skb);
skb = nskb; skb = nskb;
page = virt_to_page(skb->data); page = virt_to_page(skb->data);
offset = offset_in_page(skb->data); offset = offset_in_page(skb->data);
......
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