ia64/linux-2.6.18-xen.hg

changeset 784:51decc39e5e7

linux/netback: unmap tx ring gref when mapping of rx ring gref failed

Signed-off-by: Jan Beulich <jbeulich@novell.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Jan 28 13:42:09 2009 +0000 (2009-01-28)
parents c9783c08495c
children 8197c86e6729
files drivers/xen/netback/interface.c
line diff
     1.1 --- a/drivers/xen/netback/interface.c	Wed Jan 28 13:41:33 2009 +0000
     1.2 +++ b/drivers/xen/netback/interface.c	Wed Jan 28 13:42:09 2009 +0000
     1.3 @@ -219,6 +219,13 @@ static int map_frontend_pages(
     1.4  		BUG();
     1.5  
     1.6  	if (op.status) {
     1.7 +		struct gnttab_unmap_grant_ref unop;
     1.8 +
     1.9 +		gnttab_set_unmap_op(&unop,
    1.10 +				    (unsigned long)netif->tx_comms_area->addr,
    1.11 +				    GNTMAP_host_map, netif->tx_shmem_handle);
    1.12 +		VOID(HYPERVISOR_grant_table_op(GNTTABOP_unmap_grant_ref,
    1.13 +					       &unop, 1));
    1.14  		DPRINTK(" Gnttab failure mapping rx_ring_ref!\n");
    1.15  		return op.status;
    1.16  	}