[NTOS:MM]

- When paging in data for an image section, first flush outstanding cached data since paging reads are noncached. Fixes failure to create section in ntdll_apitest:NtMapViewOfSection/Test_NoLoadSection
- Gracefully handle out-of-pool situation
CORE-8384

svn path=/trunk/; revision=68677
This commit is contained in:
Thomas Faber
2015-08-11 08:21:36 +00:00
parent 195d119706
commit c4f456e3bd
+7 -1
View File
@@ -3236,6 +3236,12 @@ ExeFmtpReadFile(IN PVOID File,
BufferSize = Length + OffsetAdjustment;
BufferSize = PAGE_ROUND_UP(BufferSize);
/* Flush data since we're about to perform a non-cached read */
CcFlushCache(FileObject->SectionObjectPointer,
&FileOffset,
BufferSize,
&Iosb);
/*
* It's ok to use paged pool, because this is a temporary buffer only used in
* the loading of executables. The assumption is that MmCreateSection is
@@ -3247,7 +3253,7 @@ ExeFmtpReadFile(IN PVOID File,
'rXmM');
if (!Buffer)
{
KeBugCheck(MEMORY_MANAGEMENT);
return STATUS_INSUFFICIENT_RESOURCES;
}
UsedSize = 0;