mirror of
https://github.com/reactos/reactos.git
synced 2025-06-13 21:48:41 +00:00
[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:
parent
faacccfc2a
commit
468cae26b2
2 changed files with 10 additions and 10 deletions
|
@ -1307,8 +1307,8 @@ FORCEINLINE
|
||||||
VOID
|
VOID
|
||||||
MiUnlockProcessWorkingSetForFault(IN PEPROCESS Process,
|
MiUnlockProcessWorkingSetForFault(IN PEPROCESS Process,
|
||||||
IN PETHREAD Thread,
|
IN PETHREAD Thread,
|
||||||
IN BOOLEAN Safe,
|
OUT PBOOLEAN Safe,
|
||||||
IN BOOLEAN Shared)
|
OUT PBOOLEAN Shared)
|
||||||
{
|
{
|
||||||
ASSERT(MI_WS_OWNER(Process));
|
ASSERT(MI_WS_OWNER(Process));
|
||||||
|
|
||||||
|
@ -1317,22 +1317,22 @@ MiUnlockProcessWorkingSetForFault(IN PEPROCESS Process,
|
||||||
{
|
{
|
||||||
/* Release unsafely */
|
/* Release unsafely */
|
||||||
MiUnlockProcessWorkingSetUnsafe(Process, Thread);
|
MiUnlockProcessWorkingSetUnsafe(Process, Thread);
|
||||||
Safe = FALSE;
|
*Safe = FALSE;
|
||||||
Shared = FALSE;
|
*Shared = FALSE;
|
||||||
}
|
}
|
||||||
else if (Thread->OwnsProcessWorkingSetExclusive == 1)
|
else if (Thread->OwnsProcessWorkingSetExclusive == 1)
|
||||||
{
|
{
|
||||||
/* Owner is safe and exclusive, release normally */
|
/* Owner is safe and exclusive, release normally */
|
||||||
MiUnlockProcessWorkingSet(Process, Thread);
|
MiUnlockProcessWorkingSet(Process, Thread);
|
||||||
Safe = TRUE;
|
*Safe = TRUE;
|
||||||
Shared = FALSE;
|
*Shared = FALSE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Owner is shared (implies safe), release normally */
|
/* Owner is shared (implies safe), release normally */
|
||||||
ASSERT(FALSE);
|
ASSERT(FALSE);
|
||||||
Safe = TRUE;
|
*Safe = TRUE;
|
||||||
Shared = TRUE;
|
*Shared = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -223,8 +223,8 @@ MiMakeSystemAddressValid(IN PVOID PageTableVirtualAddress,
|
||||||
/* Release the working set lock */
|
/* Release the working set lock */
|
||||||
MiUnlockProcessWorkingSetForFault(CurrentProcess,
|
MiUnlockProcessWorkingSetForFault(CurrentProcess,
|
||||||
CurrentThread,
|
CurrentThread,
|
||||||
WsSafe,
|
&WsSafe,
|
||||||
WsShared);
|
&WsShared);
|
||||||
|
|
||||||
/* Fault it in */
|
/* Fault it in */
|
||||||
Status = MmAccessFault(FALSE, PageTableVirtualAddress, KernelMode, NULL);
|
Status = MmAccessFault(FALSE, PageTableVirtualAddress, KernelMode, NULL);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue