gro: Disable frag0 optimization on IPv6 ext headers
authorHerbert Xu <herbert@gondor.apana.org.au>
Tue, 10 Jan 2017 20:24:15 +0000 (12:24 -0800)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 16 Mar 2017 02:18:42 +0000 (02:18 +0000)
commit3890b98611757fe3e4808e0f52e4d822d6e75e6d
tree5d545004e4f056fbd4a19be454c1f8d9cede48e6
parentd0685bcb7db9f04eed088ac8f259da262d902409
gro: Disable frag0 optimization on IPv6 ext headers

commit 57ea52a865144aedbcd619ee0081155e658b6f7d upstream.

The GRO fast path caches the frag0 address.  This address becomes
invalid if frag0 is modified by pskb_may_pull or its variants.
So whenever that happens we must disable the frag0 optimization.

This is usually done through the combination of gro_header_hard
and gro_header_slow, however, the IPv6 extension header path did
the pulling directly and would continue to use the GRO fast path
incorrectly.

This patch fixes it by disabling the fast path when we enter the
IPv6 extension header path.

Fixes: 78a478d0efd9 ("gro: Inline skb_gro_header and cache frag0 virtual address")
Reported-by: Slava Shwartsman <slavash@mellanox.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[bwh: Backported to 3.2: adjust filename]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
include/linux/netdevice.h
net/ipv6/af_inet6.c