gro: Fix potential use after free
authorHerbert Xu <herbert@gondor.apana.org.au>
Fri, 26 Dec 2008 22:57:42 +0000 (14:57 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 26 Dec 2008 22:57:42 +0000 (14:57 -0800)
The initial skb may have been freed after napi_gro_complete in
napi_gro_receive if it was merged into an existing packet.  Thus
we cannot check same_flow (which indicates whether it was merged)
after calling napi_gro_complete.

This patch fixes this by saving the same_flow status before the
call to napi_gro_complete.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>

No differences found