mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 22:32:58 +00:00
[NTOSKRNL]
- Only unmap pages if they were mapped - Make sure the page reference counts are sane when freeing the cache memory area svn path=/trunk/; revision=54690
This commit is contained in:
parent
35c9fc7ae8
commit
4be8d4740d
2 changed files with 4 additions and 0 deletions
|
@ -645,7 +645,10 @@ CcZeroData (IN PFILE_OBJECT FileObject,
|
||||||
KeWaitForSingleObject(&Event, Executive, KernelMode, FALSE, NULL);
|
KeWaitForSingleObject(&Event, Executive, KernelMode, FALSE, NULL);
|
||||||
Status = Iosb.Status;
|
Status = Iosb.Status;
|
||||||
}
|
}
|
||||||
|
if (Mdl->MdlFlags & MDL_MAPPED_TO_SYSTEM_VA)
|
||||||
|
{
|
||||||
MmUnmapLockedPages(Mdl->MappedSystemVa, Mdl);
|
MmUnmapLockedPages(Mdl->MappedSystemVa, Mdl);
|
||||||
|
}
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
return(FALSE);
|
return(FALSE);
|
||||||
|
|
|
@ -899,6 +899,7 @@ CcFreeCachePage(PVOID Context, MEMORY_AREA* MemoryArea, PVOID Address,
|
||||||
ASSERT(SwapEntry == 0);
|
ASSERT(SwapEntry == 0);
|
||||||
if (Page != 0)
|
if (Page != 0)
|
||||||
{
|
{
|
||||||
|
ASSERT(MmGetReferenceCountPage(Page) == 1);
|
||||||
MmReleasePageMemoryConsumer(MC_CACHE, Page);
|
MmReleasePageMemoryConsumer(MC_CACHE, Page);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue