gso: Stop fraglists from escaping
commit7aa61b2706f362c31e1ad125f694e6ef5f4e2385
authorHerbert Xu <herbert@gondor.apana.org.au>
Thu, 4 Jun 2009 04:20:51 +0000 (3 21:20 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sun, 16 Aug 2009 21:18:15 +0000 (16 14:18 -0700)
tree271a6d006d21bd033b73f0bcd73dd83fc211a437
parent9ba3f8ea722e86b87627c2a4efbd464674e88412
gso: Stop fraglists from escaping

[ Upstream commit 278b2513f76161a9cf1ebddd620dc9d1714fe573 ]

As it stands skb fraglists can get past the check in dev_queue_xmit
if the skb is marked as GSO.  In particular, if the packet doesn't
have the proper checksums for GSO, but can otherwise be handled by
the underlying device, we will not perform the fraglist check on it
at all.

If the underlying device cannot handle fraglists, then this will
break.

The fix is as simple as moving the fraglist check from the device
check into skb_gso_ok.

This has caused crashes with Xen when used together with GRO which
can generate GSO packets with fraglists.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
include/linux/netdevice.h