All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] linux-2.6.18/blktap2: fix after c/s 1035
@ 2010-11-17 15:15 Jan Beulich
  2010-11-17 15:22 ` Olaf Hering
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Beulich @ 2010-11-17 15:15 UTC (permalink / raw)
  To: xen-devel@lists.xensource.com; +Cc: Olaf Hering

[-- Attachment #1: Type: text/plain, Size: 591 bytes --]

The grant handle must be invalidated only in the error path.

Signed-off-by: Jan Beulich <jbeulich@novell.com>

--- 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 == GNTST_eagain);
 				BTERR("invalid user buffer: could not remap it\n");
 				err |= 1;
+				table->grants[grant].handle = INVALID_GRANT_HANDLE;
 			}
-			table->grants[grant].handle = INVALID_GRANT_HANDLE;
 			request->handles[i].user = table->grants[grant].handle;
 			grant++;
 		}




[-- Attachment #2: xen-blktap2-fix-1035.patch --]
[-- Type: text/plain, Size: 585 bytes --]

The grant handle must be invalidated only in the error path.

Signed-off-by: Jan Beulich <jbeulich@novell.com>

--- 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 == GNTST_eagain);
 				BTERR("invalid user buffer: could not remap it\n");
 				err |= 1;
+				table->grants[grant].handle = INVALID_GRANT_HANDLE;
 			}
-			table->grants[grant].handle = INVALID_GRANT_HANDLE;
 			request->handles[i].user = table->grants[grant].handle;
 			grant++;
 		}

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] linux-2.6.18/blktap2: fix after c/s 1035
  2010-11-17 15:15 [PATCH] linux-2.6.18/blktap2: fix after c/s 1035 Jan Beulich
@ 2010-11-17 15:22 ` Olaf Hering
  0 siblings, 0 replies; 2+ messages in thread
From: Olaf Hering @ 2010-11-17 15:22 UTC (permalink / raw)
  To: Jan Beulich; +Cc: xen-devel@lists.xensource.com

On Wed, Nov 17, Jan Beulich wrote:

> The grant handle must be invalidated only in the error path.
> 
> Signed-off-by: Jan Beulich <jbeulich@novell.com>

Sorry, well spotted.

Signed-off-by: Olaf Hering <olaf@aepfle.de>

Olaf

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-11-17 15:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-17 15:15 [PATCH] linux-2.6.18/blktap2: fix after c/s 1035 Jan Beulich
2010-11-17 15:22 ` Olaf Hering

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.