ia64/xen-unstable

changeset 8333:7f2ccea5a4ec

Fix rx buffer allocation in netfront. The final allocation size
was ending up bigger than PAGE_SIZE.

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Tue Dec 13 03:47:47 2005 +0100 (2005-12-13)
parents 8b3454b6bf5e
children ef2fff896422
files linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c	Tue Dec 13 00:56:50 2005 +0000
     1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c	Tue Dec 13 03:47:47 2005 +0100
     1.3 @@ -540,8 +540,8 @@ static void network_alloc_rx_buffers(str
     1.4  		 * tailroom then round down to SKB_DATA_ALIGN boundary.
     1.5  		 */
     1.6  		skb = alloc_xen_skb(
     1.7 -			(PAGE_SIZE - 16 - sizeof(struct skb_shared_info)) &
     1.8 -			(-SKB_DATA_ALIGN(1)));
     1.9 +			((PAGE_SIZE - sizeof(struct skb_shared_info)) &
    1.10 +			 (-SKB_DATA_ALIGN(1))) - 16);
    1.11  		if (skb == NULL)
    1.12  			break;
    1.13  		__skb_queue_tail(&np->rx_batch, skb);