netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-2.6] gro: reset skb_iif on reuse
@ 2011-02-02 21:27 andy
  2011-02-02 22:53 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: andy @ 2011-02-02 21:27 UTC (permalink / raw)
  To: netdev

Like Herbert's change from a few days ago:

66c46d741e2e60f0e8b625b80edb0ab820c46d7a gro: Reset dev pointer on reuse

this may not be necessary at this point, but we should still clean up
the skb->skb_iif.  If not we may end up with an invalid valid for
skb->skb_iif when the skb is reused and the check is done in
__netif_receive_skb.

Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
---
 net/core/dev.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/net/core/dev.c b/net/core/dev.c
index 4c90789..b6d0bf8 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -3426,6 +3426,7 @@ static void napi_reuse_skb(struct napi_struct *napi, struct sk_buff *skb)
 	skb_reserve(skb, NET_IP_ALIGN - skb_headroom(skb));
 	skb->vlan_tci = 0;
 	skb->dev = napi->dev;
+	skb->skb_iif = 0;
 
 	napi->skb = skb;
 }
-- 
1.7.3.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-2.6] gro: reset skb_iif on reuse
  2011-02-02 21:27 [PATCH net-2.6] gro: reset skb_iif on reuse andy
@ 2011-02-02 22:53 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2011-02-02 22:53 UTC (permalink / raw)
  To: andy; +Cc: netdev

From: andy@greyhouse.net
Date: Wed,  2 Feb 2011 16:27:27 -0500

> Like Herbert's change from a few days ago:
> 
> 66c46d741e2e60f0e8b625b80edb0ab820c46d7a gro: Reset dev pointer on reuse
> 
> this may not be necessary at this point, but we should still clean up
> the skb->skb_iif.  If not we may end up with an invalid valid for
> skb->skb_iif when the skb is reused and the check is done in
> __netif_receive_skb.
> 
> Signed-off-by: Andy Gospodarek <andy@greyhouse.net>

Applied, thanks Andy.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-02-02 22:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-02 21:27 [PATCH net-2.6] gro: reset skb_iif on reuse andy
2011-02-02 22:53 ` 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).