* [PATCH net-next] xen-netfront: be more drop monitor friendly
@ 2017-08-30 17:32 Eric Dumazet
2017-08-30 23:01 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Eric Dumazet @ 2017-08-30 17:32 UTC (permalink / raw)
To: David Miller; +Cc: netdev
From: Eric Dumazet <edumazet@google.com>
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>
---
drivers/net/xen-netfront.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] xen-netfront: be more drop monitor friendly
2017-08-30 17:32 [PATCH net-next] xen-netfront: be more drop monitor friendly Eric Dumazet
@ 2017-08-30 23:01 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-08-30 23:01 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 30 Aug 2017 10:32:58 -0700
> From: Eric Dumazet <edumazet@google.com>
>
> 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>
Applied, thanks Eric.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-30 23:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-30 17:32 [PATCH net-next] xen-netfront: be more drop monitor friendly Eric Dumazet
2017-08-30 23:01 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).