ia64/xen-unstable

changeset 9946:9aba6cd8e9e1

Adjust skb->truesize appropriately in netback driver.

When you generate non-linear skb's as netback does, it is up to you
to ensure that truesize reflects the size of paged part of the skb.
Otherwise socket memory accounting in Linux falls apart.

Thanks to the new check that David Miller added to TCP we were able
to catch this bug.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
author kaf24@firebug.cl.cam.ac.uk
date Fri May 05 13:49:49 2006 +0100 (2006-05-05)
parents 9ce1e7c67d5d
children 6e55040e7b79
files linux-2.6-xen-sparse/drivers/xen/netback/netback.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/drivers/xen/netback/netback.c	Fri May 05 13:46:59 2006 +0100
     1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/netback/netback.c	Fri May 05 13:49:49 2006 +0100
     1.3 @@ -659,6 +659,7 @@ static void net_tx_action(unsigned long 
     1.4  
     1.5  		skb->data_len  = txreq.size - data_len;
     1.6  		skb->len      += skb->data_len;
     1.7 +		skb->truesize += skb->data_len;
     1.8  
     1.9  		skb->dev      = netif->dev;
    1.10  		skb->protocol = eth_type_trans(skb, skb->dev);