|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [win-pv-devel] [PATCH] Don't drop FDO mutex between PDO enumeration and Relations Count check
A PDO can disappear between these two, leading to an assertion failure so
keep the lock held to stop the list from being changed.
Signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx>
---
src/xendisk/fdo.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/src/xendisk/fdo.c b/src/xendisk/fdo.c
index cfa1ad3..779b7ad 100644
--- a/src/xendisk/fdo.c
+++ b/src/xendisk/fdo.c
@@ -265,8 +265,6 @@ __FdoEnumerate(
Relations->Objects,
sizeof (PDEVICE_OBJECT) * Count);
- __FdoAcquireMutex(Fdo);
-
// Remove any PDOs that do not appear in the device list
ListEntry = Fdo->Dx->ListEntry.Flink;
while (ListEntry != &Fdo->Dx->ListEntry) {
@@ -294,8 +292,6 @@ __FdoEnumerate(
}
}
- __FdoReleaseMutex(Fdo);
-
__FdoFree(PhysicalDeviceObject);
return;
@@ -865,11 +861,11 @@ FdoQueryDeviceRelations(
Relations = (PDEVICE_RELATIONS)Irp->IoStatus.Information;
+ __FdoAcquireMutex(Fdo);
+
if (Relations->Count != 0)
__FdoEnumerate(Fdo, Relations);
- __FdoAcquireMutex(Fdo);
-
Count = 0;
for (ListEntry = Fdo->Dx->ListEntry.Flink;
ListEntry != &Fdo->Dx->ListEntry;
--
2.1.1
_______________________________________________
win-pv-devel mailing list
win-pv-devel@xxxxxxxxxxxxxxxxxxxx
http://lists.xenproject.org/cgi-bin/mailman/listinfo/win-pv-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |