[NTOS:MM] Allow contiguous-memory frees at DISPATCH_LEVEL (#9349)

MmFreeContiguousMemory() is callable at up to DISPATCH_LEVEL,
but MiFreeContiguousMemory() used PAGED_CODE(), which incorrectly asserted
above APC_LEVEL in checked builds.

Replace it with an assertion that enforces the exported IRQL contract.
This commit is contained in:
Ahmed Arif
2026-07-27 17:44:40 +03:00
committed by GitHub
parent 28373a9f84
commit 98256a4f5d
+1 -1
View File
@@ -464,7 +464,7 @@ MiFreeContiguousMemory(IN PVOID BaseAddress)
PFN_NUMBER PageFrameIndex, LastPage, PageCount;
PMMPFN Pfn1, StartPfn;
PMMPTE PointerPte;
PAGED_CODE();
ASSERT_IRQL_LESS_OR_EQUAL(DISPATCH_LEVEL);
//
// First, check if the memory came from initial nonpaged pool, or expansion