https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d440434a8e120067abba5630214dd804ba06449f

commit d440434a8e120067abba5630214dd804ba06449f
Author:     Jérôme Gardou <[email protected]>
AuthorDate: Wed Nov 18 12:14:41 2020 +0100
Commit:     Jérôme Gardou <[email protected]>
CommitDate: Wed Feb 3 09:41:22 2021 +0100

    [NTOS/MM] Do not error when FS returns STATUS_END_OF_FILE for paged read.
    
    Also remove a seemingly invalid ASSERT
---
 ntoskrnl/mm/section.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/ntoskrnl/mm/section.c b/ntoskrnl/mm/section.c
index 6c521522f4f..46bf5cb571d 100644
--- a/ntoskrnl/mm/section.c
+++ b/ntoskrnl/mm/section.c
@@ -1209,6 +1209,11 @@ MiReadPage(PMEMORY_AREA MemoryArea,
         MmUnmapLockedPages (Mdl->MappedSystemVa, Mdl);
     }
 
+    if (Status == STATUS_END_OF_FILE)
+    {
+        Status = STATUS_SUCCESS;
+    }
+
     return Status;
 }
 
@@ -2211,7 +2216,7 @@ MmCreateDataFileSection(PSECTION *SectionObject,
     if (!GotFileHandle)
     {
         ASSERT(UMaximumSize != NULL);
-        ASSERT(UMaximumSize->QuadPart != 0);
+        // ASSERT(UMaximumSize->QuadPart != 0);
         MaximumSize = *UMaximumSize;
     }
     else

Reply via email to