WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] linux/netback: unmap tx ring gref when mapping of rx

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] linux/netback: unmap tx ring gref when mapping of rx ring gref failed
From: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Date: Wed, 28 Jan 2009 12:27:58 +0000
Delivery-date: Wed, 28 Jan 2009 04:27:47 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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 <jbeulich@xxxxxxxxxx>

--- 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();
 
        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;
        }




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] linux/netback: unmap tx ring gref when mapping of rx ring gref failed, Jan Beulich <=