[Wine-patches] [eterhack] ntoskrnl.exe: Comment out broken IoInvalidateDeviceRelations implementation.
Dmitry Timoshkov
dtimoshkov на etersoft.ru
Вт Ноя 10 11:51:10 MSK 2015
Every driver always calls IoCompleteRequest once the request has been
processed, and IoCompleteRequest is supposed to free IRP on its own. This
means that once IoCallDriver returns the passed in irp pointer is no longer
valid, and accessing memory pointed by irp is wrong. Due to the reasons
mentioned above current IoInvalidateDeviceRelations implementation can't work.
---
dlls/ntoskrnl.exe/ntoskrnl.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c
index 892c240..3bcdc86 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.c
+++ b/dlls/ntoskrnl.exe/ntoskrnl.c
@@ -1770,6 +1770,13 @@ void WINAPI IoInvalidateDeviceRelations( PDEVICE_OBJECT DeviceObject,
{
TRACE( "%p, %u\n", DeviceObject, Type );
+/* Every driver always calls IoCompleteRequest once the request has been
+ * processed, and IoCompleteRequest is supposed to free IRP on its own.
+ * This means that once IoCallDriver returns the passed in irp pointer
+ * is no longer valid, and accessing memory pointed by irp is wrong.
+ * Due to the reasons mentioned above the following code can't work.
+ */
+#if 0
while (DeviceObject->AttachedDevice)
DeviceObject = DeviceObject->AttachedDevice;
if (Type == BusRelations)
@@ -1824,6 +1831,7 @@ void WINAPI IoInvalidateDeviceRelations( PDEVICE_OBJECT DeviceObject,
}
}
else
+#endif
FIXME( "DEVICE_RELATION_TYPE %u not implemented\n", Type );
}
--
2.6.3
Подробная информация о списке рассылки Wine-patches