mirror of
https://github.com/reactos/reactos.git
synced 2024-09-28 21:44:31 +00:00
[NTOSKRNL] Dereference page file objects in MM shutdown phase 1
Hack the call the MM shutdown phase 1
This commit is contained in:
parent
3814a822f1
commit
5aaadf39db
|
@ -39,8 +39,21 @@ MmShutdownSystem(IN ULONG Phase)
|
|||
{
|
||||
MiShutdownSystem();
|
||||
}
|
||||
else if (Phase == 1)
|
||||
{
|
||||
ULONG i;
|
||||
|
||||
/* Loop through all the paging files */
|
||||
for (i = 0; i < MmNumberOfPagingFiles; i++)
|
||||
{
|
||||
/* And dereference them */
|
||||
ObDereferenceObject(MmPagingFile[i]->FileObject);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ASSERT(Phase == 2);
|
||||
|
||||
UNIMPLEMENTED;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -294,6 +294,11 @@ PopGracefulShutdown(IN PVOID Context)
|
|||
IoShutdownSystem(1);
|
||||
CcWaitForCurrentLazyWriterActivity();
|
||||
|
||||
/* FIXME: Calling Mm shutdown phase 1 here to get page file dereference
|
||||
* but it shouldn't be called here. Only phase 2 should be called.
|
||||
*/
|
||||
MmShutdownSystem(1);
|
||||
|
||||
/* Note that here, we should broadcast the power IRP to devices */
|
||||
|
||||
/* In this step, the HAL disables any wake timers */
|
||||
|
|
Loading…
Reference in a new issue