From: "Jan Beulich" Subject: [PATCH] linux/netback: unmap tx ring gref when mapping of rx ring gref failed Date: Wed, 28 Jan 2009 12:27:58 +0000 Message-ID: <49805D5E.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org 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 --- head-2009-01-21.orig/drivers/xen/netback/interface.c 2008-12-01 = 12:10:26.000000000 +0100 +++ head-2009-01-21/drivers/xen/netback/interface.c 2009-01-26 = 14:49:11.000000000 +0100 @@ -219,6 +219,13 @@ static int map_frontend_pages( BUG(); =20 if (op.status) { + struct gnttab_unmap_grant_ref unop; + + gnttab_set_unmap_op(&unop, + (unsigned long)netif->tx_comms_area->ad= dr, + 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; }