From 8f421a2ad0d7dac8aa3c7384d3f31d9cd32f07ae Mon Sep 17 00:00:00 2001 From: Sir Richard Date: Fri, 19 Feb 2010 18:25:29 +0000 Subject: [PATCH] [NTOS]: Fix a logic error which could cause pages on the free list which failed to be zeroed out due to running out of hyperspace mappings to appear as being on the zero page list even though they were inserted back on the free page list. svn path=/trunk/; revision=45624 --- reactos/ntoskrnl/mm/freelist.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/reactos/ntoskrnl/mm/freelist.c b/reactos/ntoskrnl/mm/freelist.c index 4eec29d95ca..7098cef576c 100644 --- a/reactos/ntoskrnl/mm/freelist.c +++ b/reactos/ntoskrnl/mm/freelist.c @@ -1000,15 +1000,16 @@ MmZeroPageThreadMain(PVOID Ignored) Status = MiZeroPage(Pfn); oldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock); - PageDescriptor->u3.e1.PageLocation = ZeroedPageList; if (NT_SUCCESS(Status)) { InsertHeadList(&FreeZeroedPageListHead, ListEntry); + PageDescriptor->u3.e1.PageLocation = ZeroedPageList; Count++; } else { InsertHeadList(&FreeUnzeroedPageListHead, ListEntry); + PageDescriptor->u3.e1.PageLocation = FreePageList; UnzeroedPageCount++; }