ia64/xen-unstable

changeset 8659:2d31ebf402e1

Fix batched request list overflow on packet receive path
in the netback driver.

Signed-off-by: Robert Read <robert@xensource.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Wed Jan 25 14:36:35 2006 +0100 (2006-01-25)
parents 709bce2f08d6
children 407358daf389
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	Wed Jan 25 14:28:07 2006 +0100
     1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/netback/netback.c	Wed Jan 25 14:36:35 2006 +0100
     1.3 @@ -39,10 +39,9 @@ static struct timer_list net_timer;
     1.4  #define MAX_PENDING_REQS 256
     1.5  
     1.6  static struct sk_buff_head rx_queue;
     1.7 -static multicall_entry_t rx_mcl[NET_RX_RING_SIZE*2+1];
     1.8 +static multicall_entry_t rx_mcl[NET_RX_RING_SIZE+1];
     1.9  static mmu_update_t rx_mmu[NET_RX_RING_SIZE];
    1.10 -
    1.11 -static gnttab_transfer_t grant_rx_op[MAX_PENDING_REQS];
    1.12 +static gnttab_transfer_t grant_rx_op[NET_RX_RING_SIZE];
    1.13  static unsigned char rx_notify[NR_IRQS];
    1.14  
    1.15  static unsigned long mmap_vstart;
    1.16 @@ -245,7 +244,7 @@ static void net_rx_action(unsigned long 
    1.17  		__skb_queue_tail(&rxq, skb);
    1.18  
    1.19  		/* Filled the batch queue? */
    1.20 -		if ((mcl - rx_mcl) == ARRAY_SIZE(rx_mcl))
    1.21 +		if ((gop - grant_rx_op) == ARRAY_SIZE(grant_rx_op))
    1.22  			break;
    1.23  	}
    1.24