gro: Fix page ref count for skbs freed normally
authorHerbert Xu <herbert@gondor.apana.org.au>
Thu, 15 Jan 2009 04:40:03 +0000 (20:40 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 15 Jan 2009 04:40:03 +0000 (20:40 -0800)
When an skb with page frags is merged into an existing one, we
cannibalise its reference count.  This is OK when the skb is
reused because we set nr_frags to zero in that case.  However,
for the case where the skb is freed through kfree_skb, we didn't
clear nr_frags which causes the page to be freed prematurely.

This is fixed by moving the skb resetting into skb_gro_receive.

Reported-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>

No differences found