[NTOSKRNL]

* Fix the owner's attributes handling when releasing the working set lock. CIDs 731438 and 731439.
CORE-6681

svn path=/trunk/; revision=60615
This commit is contained in:
Amine Khaldi 2013-10-11 18:12:16 +00:00
parent faacccfc2a
commit 468cae26b2
2 changed files with 10 additions and 10 deletions

View file

@ -1307,8 +1307,8 @@ FORCEINLINE
VOID
MiUnlockProcessWorkingSetForFault(IN PEPROCESS Process,
IN PETHREAD Thread,
IN BOOLEAN Safe,
IN BOOLEAN Shared)
OUT PBOOLEAN Safe,
OUT PBOOLEAN Shared)
{
ASSERT(MI_WS_OWNER(Process));
@ -1317,22 +1317,22 @@ MiUnlockProcessWorkingSetForFault(IN PEPROCESS Process,
{
/* Release unsafely */
MiUnlockProcessWorkingSetUnsafe(Process, Thread);
Safe = FALSE;
Shared = FALSE;
*Safe = FALSE;
*Shared = FALSE;
}
else if (Thread->OwnsProcessWorkingSetExclusive == 1)
{
/* Owner is safe and exclusive, release normally */
MiUnlockProcessWorkingSet(Process, Thread);
Safe = TRUE;
Shared = FALSE;
*Safe = TRUE;
*Shared = FALSE;
}
else
{
/* Owner is shared (implies safe), release normally */
ASSERT(FALSE);
Safe = TRUE;
Shared = TRUE;
*Safe = TRUE;
*Shared = TRUE;
}
}

View file

@ -223,8 +223,8 @@ MiMakeSystemAddressValid(IN PVOID PageTableVirtualAddress,
/* Release the working set lock */
MiUnlockProcessWorkingSetForFault(CurrentProcess,
CurrentThread,
WsSafe,
WsShared);
&WsSafe,
&WsShared);
/* Fault it in */
Status = MmAccessFault(FALSE, PageTableVirtualAddress, KernelMode, NULL);