| 
    
 [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
 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
 
  | 
  
![]()  | 
            
         Lists.xenproject.org is hosted with RackSpace, monitoring our  |