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

Re: [Xen-devel] need more sanity checks in blkback when using grant tabl

To: Kip Macy <kip.macy@xxxxxxxxx>
Subject: Re: [Xen-devel] need more sanity checks in blkback when using grant tables
From: Christopher Clark <christopher.w.clark@xxxxxxxxx>
Date: Mon, 18 Apr 2005 17:04:22 -0700
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 19 Apr 2005 00:04:17 +0000
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ZSbhOr9NJEssAll0FvgQ1R3Cb8zRmEF9vwINIBjgJOm00mwDxCeuOUXfLBWdTIwYHxZPQslydtFsOkf4eE9lTxt6GDyUQgZ6gqFcGYWwpNNoodclAxtTWcXFEOTVtnPyAH1gjj21bU3QVJaUA5Z92TPeEINVHzj9pq4Kf7aOOOs=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <b1fa291705041813335a286f3e@xxxxxxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <b1fa291705041813335a286f3e@xxxxxxxxxxxxxx>
Reply-to: cwc22@xxxxxxxxx
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thanks for the catch, Kip. Fix inline below.

Signed-off-by: Christopher Clark


===== linux-2.6.11-xen-sparse/drivers/xen/blkback/blkback.c 1.38 vs edited =====
--- 1.38/linux-2.6.11-xen-sparse/drivers/xen/blkback/blkback.c 
2005-04-05 05:28:05 -07:00
+++ edited/linux-2.6.11-xen-sparse/drivers/xen/blkback/blkback.c   
2005-04-18 18:48:12 -07:00
@@ -397,7 +397,7 @@
                         GNTTABOP_map_grant_ref, &op, 1)))
             BUG();

-        if ( op.u.map_grant_ref.dev_bus_addr == 0 )
+        if ( op.u.map_grant_ref.handle < 0 )
             goto out;

         pending_handle(pending_idx, 0) = op.u.map_grant_ref.handle;
@@ -500,7 +500,7 @@

     for ( i = 0; i < nseg; i++ )
     {
-        if ( unlikely(aop[i].u.map_grant_ref.dev_bus_addr == 0) )
+        if ( unlikely(aop[i].u.map_grant_ref.handle < 0) )
         {
             DPRINTK("invalid buffer -- could not remap it\n");
             fast_flush_area(pending_idx, nseg);

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

<Prev in Thread] Current Thread [Next in Thread>