mirror of
https://github.com/reactos/reactos.git
synced 2025-04-25 08:00:24 +00:00
[NTOS:MM] Add more checks for MEMORY_AREA_OWNED_BY_ARM3
This commit is contained in:
parent
d0a7e496aa
commit
fca88bb94d
2 changed files with 3 additions and 5 deletions
2
ntoskrnl/cache/section/data.c
vendored
2
ntoskrnl/cache/section/data.c
vendored
|
@ -720,7 +720,7 @@ MmUnmapViewOfCacheSegment(PMMSUPPORT AddressSpace,
|
|||
PMM_SECTION_SEGMENT Segment;
|
||||
|
||||
MemoryArea = MmLocateMemoryAreaByAddress(AddressSpace, BaseAddress);
|
||||
if (MemoryArea == NULL || MemoryArea->DeleteInProgress)
|
||||
if (MemoryArea == NULL || MemoryArea->Type == MEMORY_AREA_OWNED_BY_ARM3 || MemoryArea->DeleteInProgress)
|
||||
{
|
||||
ASSERT(MemoryArea);
|
||||
return STATUS_UNSUCCESSFUL;
|
||||
|
|
|
@ -1902,10 +1902,9 @@ MiQueryMemoryBasicInformation(IN HANDLE ProcessHandle,
|
|||
|
||||
/* Find the memory area the specified address belongs to */
|
||||
MemoryArea = MmLocateMemoryAreaByAddress(&TargetProcess->Vm, BaseAddress);
|
||||
ASSERT(MemoryArea != NULL);
|
||||
|
||||
/* Determine information dependent on the memory area type */
|
||||
if (MemoryArea->Type == MEMORY_AREA_SECTION_VIEW)
|
||||
if (MemoryArea && MemoryArea->Type == MEMORY_AREA_SECTION_VIEW)
|
||||
{
|
||||
Status = MmQuerySectionView(MemoryArea, BaseAddress, &MemoryInfo, &ResultLength);
|
||||
if (!NT_SUCCESS(Status))
|
||||
|
@ -4914,8 +4913,7 @@ NtAllocateVirtualMemory(IN HANDLE ProcessHandle,
|
|||
// Make sure this is an ARM3 section
|
||||
//
|
||||
MemoryArea = MmLocateMemoryAreaByAddress(AddressSpace, (PVOID)PAGE_ROUND_DOWN(PBaseAddress));
|
||||
ASSERT(MemoryArea != NULL);
|
||||
if (MemoryArea->Type != MEMORY_AREA_OWNED_BY_ARM3)
|
||||
if (MemoryArea && MemoryArea->Type != MEMORY_AREA_OWNED_BY_ARM3)
|
||||
{
|
||||
DPRINT1("Illegal commit of non-ARM3 section!\n");
|
||||
Status = STATUS_ALREADY_COMMITTED;
|
||||
|
|
Loading…
Reference in a new issue