mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 19:26:32 +00:00
[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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user