From: Herbert Xu Date: Fri, 21 May 2010 06:07:56 +0000 (-0700) Subject: gro: Fix bogus gso_size on the first fraglist entry X-Git-Tag: firefly_0821_release~10186^2~875 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=372ee0be3eb7d1b4fa744a617dd9821a62afd8de;p=firefly-linux-kernel-4.4.55.git gro: Fix bogus gso_size on the first fraglist entry commit 622e0ca1cd4d459f5af4f2c65f4dc0dd823cb4c3 upstream. When GRO produces fraglist entries, and the resulting skb hits an interface that is incapable of TSO but capable of FRAGLIST, we end up producing a bogus packet with gso_size non-zero. This was reported in the field with older versions of KVM that did not set the TSO bits on tuntap. This patch fixes that. Reported-by: Igor Zhang Signed-off-by: Herbert Xu Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 2b5eb01f9e5d..283f44128479 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -2730,6 +2730,7 @@ int skb_gro_receive(struct sk_buff **head, struct sk_buff *skb) *NAPI_GRO_CB(nskb) = *NAPI_GRO_CB(p); skb_shinfo(nskb)->frag_list = p; skb_shinfo(nskb)->gso_size = pinfo->gso_size; + pinfo->gso_size = 0; skb_header_release(p); nskb->prev = p;