]> xenbits.xensource.com Git - legacy/linux-2.6.18-xen.git/commitdiff
linux/netback: unmap tx ring gref when mapping of rx ring gref failed
authorKeir Fraser <keir.fraser@citrix.com>
Wed, 28 Jan 2009 13:42:09 +0000 (13:42 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Wed, 28 Jan 2009 13:42:09 +0000 (13:42 +0000)
Signed-off-by: Jan Beulich <jbeulich@novell.com>
drivers/xen/netback/interface.c

index 610891fc29437393ccbbd5fe68ef4a5b0c4389e8..404001a881cd4ce48a3b22c5e6e1a668351bc156 100644 (file)
@@ -219,6 +219,13 @@ static int map_frontend_pages(
                BUG();
 
        if (op.status) {
+               struct gnttab_unmap_grant_ref unop;
+
+               gnttab_set_unmap_op(&unop,
+                                   (unsigned long)netif->tx_comms_area->addr,
+                                   GNTMAP_host_map, netif->tx_shmem_handle);
+               VOID(HYPERVISOR_grant_table_op(GNTTABOP_unmap_grant_ref,
+                                              &unop, 1));
                DPRINTK(" Gnttab failure mapping rx_ring_ref!\n");
                return op.status;
        }