mirror of
https://github.com/reactos/reactos.git
synced 2025-05-30 14:39:46 +00:00
[NTOSKRNL]
- Release the IO database lock before unloading the device (and driver too) to prevent deadlocks svn path=/trunk/; revision=56089
This commit is contained in:
parent
e0c8eedd51
commit
a7caca2e37
1 changed files with 3 additions and 3 deletions
|
@ -50,6 +50,9 @@ IopDecrementDeviceObjectRef(IN PDEVICE_OBJECT DeviceObject,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Release lock */
|
||||||
|
KeReleaseQueuedSpinLock(LockQueueIoDatabaseLock, OldIrql);
|
||||||
|
|
||||||
/* Here, DO is not referenced any longer, check if we have to unload it */
|
/* Here, DO is not referenced any longer, check if we have to unload it */
|
||||||
if (UnloadIfUnused || IoGetDevObjExtension(DeviceObject)->ExtensionFlags &
|
if (UnloadIfUnused || IoGetDevObjExtension(DeviceObject)->ExtensionFlags &
|
||||||
(DOE_UNLOAD_PENDING | DOE_DELETE_PENDING | DOE_REMOVE_PENDING))
|
(DOE_UNLOAD_PENDING | DOE_DELETE_PENDING | DOE_REMOVE_PENDING))
|
||||||
|
@ -57,9 +60,6 @@ IopDecrementDeviceObjectRef(IN PDEVICE_OBJECT DeviceObject,
|
||||||
/* Unload the driver */
|
/* Unload the driver */
|
||||||
IopUnloadDevice(DeviceObject);
|
IopUnloadDevice(DeviceObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Release lock */
|
|
||||||
KeReleaseQueuedSpinLock(LockQueueIoDatabaseLock, OldIrql);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue