linux/netback: unmap tx ring gref when mapping of rx ring gref failed
PATCH 1/1 linux/netback: unmap tx ring gref when mapping of rx ring gref failed
As usual, written and tested on 2.6.27.12 and made apply to the 2.6.18 tree without further testing.
Signed-off-by Jan Beulich <[email protected]>
drivers/xen/netback/interface.c +7 -0
@@ -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; }