From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christopher Clark Subject: Re: need more sanity checks in blkback when using grant tables Date: Mon, 18 Apr 2005 17:04:22 -0700 Message-ID: References: Reply-To: cwc22@cam.ac.uk Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: 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: Kip Macy Cc: xen-devel List-Id: xen-devel@lists.xenproject.org Thanks for the catch, Kip. Fix inline below. Signed-off-by: Christopher Clark =3D=3D=3D=3D=3D linux-2.6.11-xen-sparse/drivers/xen/blkback/blkback.c 1.38 = vs edited =3D=3D=3D=3D=3D --- 1.38/linux-2.6.11-xen-sparse/drivers/xen/blkback/blkback.c=20 2005-04-05 05:28:05 -07:00 +++ edited/linux-2.6.11-xen-sparse/drivers/xen/blkback/blkback.c =20 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 =3D=3D 0 ) + if ( op.u.map_grant_ref.handle < 0 ) goto out; pending_handle(pending_idx, 0) =3D op.u.map_grant_ref.handle; @@ -500,7 +500,7 @@ for ( i =3D 0; i < nseg; i++ ) { - if ( unlikely(aop[i].u.map_grant_ref.dev_bus_addr =3D=3D 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);