[ros-dev] ASSERT_IRQL and unrelated mm/mdl.c
art yerkes
ayerkes at speakeasy.net
Wed Sep 29 00:26:08 CEST 2004
> Unrelated, please take a look at the following patch, anyone who's cozy
> with the mm.
Sorry forgot the attachment.
--
Hey, Adam Smith, keep your invisible hands to yourself!
-------------- next part --------------
? irql_ntoskrnl/mm/section.x
Index: irql_ntoskrnl/mm/mdl.c
===================================================================
RCS file: /CVS/ReactOS/reactos/ntoskrnl/mm/mdl.c,v
retrieving revision 1.68
diff -u -r1.68 mdl.c
--- irql_ntoskrnl/mm/mdl.c 15 Aug 2004 16:39:07 -0000 1.68
+++ irql_ntoskrnl/mm/mdl.c 29 Sep 2004 03:23:24 -0000
@@ -386,7 +386,7 @@
if ((DWORD)BaseAddress >= KERNEL_BASE)
{
assert(Mdl->MdlFlags & MDL_MAPPED_TO_SYSTEM_VA);
KeAcquireSpinLock(&MiMdlMappingRegionLock, &oldIrql);
/* Deallocate all the pages used. */
@@ -562,7 +562,9 @@
if (!MmIsPagePresent(NULL, Address))
{
+ MmUnlockAddressSpace(&CurrentProcess->AddressSpace);
Status = MmNotPresentFault(Mode, (ULONG)Address, TRUE);
+ MmLockAddressSpace(&CurrentProcess->AddressSpace);
if (!NT_SUCCESS(Status))
{
for (j = 0; j < i; j++)
@@ -571,6 +574,7 @@
MmUnlockPage(Page);
MmDereferencePage(Page);
}
+ MmUnlockAddressSpace(&CurrentProcess->AddressSpace);
ExRaiseStatus(Status);
}
}
@@ -582,7 +586,9 @@
if ((Operation == IoWriteAccess || Operation == IoModifyAccess) &&
(!(MmGetPageProtect(NULL, (PVOID)Address) & PAGE_READWRITE)))
{
+ MmUnlockAddressSpace(&CurrentProcess->AddressSpace);
Status = MmAccessFault(Mode, (ULONG)Address, TRUE);
+ MmLockAddressSpace(&CurrentProcess->AddressSpace);
if (!NT_SUCCESS(Status))
{
for (j = 0; j < i; j++)
@@ -591,6 +597,7 @@
MmUnlockPage(Page);
MmDereferencePage(Page);
}
+ MmUnlockAddressSpace(&CurrentProcess->AddressSpace);
ExRaiseStatus(Status);
}
}
More information about the Ros-dev
mailing list