https://git.reactos.org/?p=reactos.git;a=commitdiff;h=fdc1d96dc1259093a07d6…
commit fdc1d96dc1259093a07d6cd36c050716e831de74
Author: Dmitry Borisov <di.sean(a)protonmail.com>
AuthorDate: Sat Jul 6 00:50:03 2024 +0600
Commit: Dmitry Borisov <di.sean(a)protonmail.com>
CommitDate: Sat Aug 3 17:08:44 2024 +0600
[ISAPNP] Make sure that APCs are disabled before acquiring a lock
Note: We could just use a fast mutex instead
---
drivers/bus/isapnp/isapnp.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/bus/isapnp/isapnp.h b/drivers/bus/isapnp/isapnp.h
index 344cc23691d..8c58679d156 100644
--- a/drivers/bus/isapnp/isapnp.h
+++ b/drivers/bus/isapnp/isapnp.h
@@ -111,6 +111,8 @@ FORCEINLINE
VOID
IsaPnpAcquireBusDataLock(VOID)
{
+ ASSERT(PsGetCurrentProcess() == PsInitialSystemProcess);
+
KeWaitForSingleObject(&BusSyncEvent, Executive, KernelMode, FALSE, NULL);
}
@@ -129,6 +131,8 @@ VOID
IsaPnpAcquireDeviceDataLock(
_In_ PISAPNP_FDO_EXTENSION FdoExt)
{
+ ASSERT(PsGetCurrentProcess() == PsInitialSystemProcess);
+
KeWaitForSingleObject(&FdoExt->DeviceSyncEvent, Executive, KernelMode, FALSE,
NULL);
}