[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • To: Kip Macy <kip.macy@xxxxxxxxx>
  • 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=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.