Skip to contentSkip to conversation

linux-2.6.18/blktap2: fix after c/s 1035

PATCH In review Jan Beulich 2 participants 2 messages Nov 17, 2010 Xen hypervisor interface

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 linux-2.6.18/blktap2: fix after c/s 1035

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

drivers/xen/blktap2/device.c +1 -1
@@ -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++;
 		}

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

drivers/xen/blktap2/device.c +1 -1
@@ -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++;
 		}

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel