From: "Jan Beulich" Subject: [PATCH] linux-2.6.18/blktap2: fix after c/s 1035 Date: Wed, 17 Nov 2010 15:15:01 +0000 Message-ID: <4CE3FF850200007800022CFA@vpn.id2.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__Part537EF165.1__=" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "xen-devel@lists.xensource.com" Cc: Olaf Hering List-Id: xen-devel@lists.xenproject.org This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=__Part537EF165.1__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline The grant handle must be invalidated only in the error path. Signed-off-by: Jan Beulich --- a/drivers/xen/blktap2/device.c +++ b/drivers/xen/blktap2/device.c @@ -516,8 +516,8 @@ blktap_map_foreign(struct blktap *tap, WARN_ON(table->grants[grant].status =3D=3D = GNTST_eagain); BTERR("invalid user buffer: could not = remap it\n"); err |=3D 1; + table->grants[grant].handle =3D INVALID_GRA= NT_HANDLE; } - table->grants[grant].handle =3D INVALID_GRANT_HANDL= E; request->handles[i].user =3D table->grants[grant].h= andle; grant++; } --=__Part537EF165.1__= Content-Type: text/plain; name="xen-blktap2-fix-1035.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="xen-blktap2-fix-1035.patch" The grant handle must be invalidated only in the error path.=0A=0ASigned-of= f-by: Jan Beulich =0A=0A--- a/drivers/xen/blktap2/devi= ce.c=0A+++ b/drivers/xen/blktap2/device.c=0A@@ -516,8 +516,8 @@ blktap_map_= foreign(struct blktap *tap,=0A WARN_ON(table->gran= ts[grant].status =3D=3D GNTST_eagain);=0A = BTERR("invalid user buffer: could not remap it\n");=0A = err |=3D 1;=0A+ table->grants[grant].handle =3D = INVALID_GRANT_HANDLE;=0A }=0A- = table->grants[grant].handle =3D INVALID_GRANT_HANDLE;=0A = request->handles[i].user =3D table->grants[grant].handle;=0A = grant++;=0A }=0A --=__Part537EF165.1__= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --=__Part537EF165.1__=--