mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 17:42:58 +00:00
[NTOS:CC]
- Gracefully handle failure to obtain virtual memory when creating a VACB. We now no longer crash when running out of virtual memory during (large) file operations (but will still crash when running out of physical memory). CORE-11533 svn path=/trunk/; revision=72164
This commit is contained in:
parent
0c43b4ec9c
commit
7849fac958
1 changed files with 9 additions and 1 deletions
|
@ -594,7 +594,8 @@ CcRosMapVacb(
|
||||||
MmUnlockAddressSpace(MmGetKernelAddressSpace());
|
MmUnlockAddressSpace(MmGetKernelAddressSpace());
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
KeBugCheck(CACHE_MANAGER);
|
DPRINT1("MmCreateMemoryArea failed with %lx for VACB %p\n", Status, Vacb);
|
||||||
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
ASSERT(((ULONG_PTR)Vacb->BaseAddress % PAGE_SIZE) == 0);
|
ASSERT(((ULONG_PTR)Vacb->BaseAddress % PAGE_SIZE) == 0);
|
||||||
|
@ -746,6 +747,13 @@ CcRosCreateVacb (
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Status = CcRosMapVacb(current);
|
Status = CcRosMapVacb(current);
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
RemoveEntryList(¤t->CacheMapVacbListEntry);
|
||||||
|
RemoveEntryList(¤t->VacbLruListEntry);
|
||||||
|
CcRosReleaseVacbLock(current);
|
||||||
|
ExFreeToNPagedLookasideList(&VacbLookasideList, current);
|
||||||
|
}
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue