mirror of
https://github.com/reactos/reactos.git
synced 2025-06-05 01:10:26 +00:00
[NTOS:EX]
- Acquire ProcessLock before accessing a process's thread list in NtQuerySystemInformation/SystemProcessInformation. Patch by Volodymyr Shcherbyna. CORE-12001 #resolve svn path=/trunk/; revision=72873
This commit is contained in:
parent
10cdda5bf5
commit
531ee01590
1 changed files with 12 additions and 0 deletions
|
@ -812,6 +812,10 @@ QSI_DEF(SystemProcessInformation)
|
||||||
{
|
{
|
||||||
SpiCurrent = (PSYSTEM_PROCESS_INFORMATION) Current;
|
SpiCurrent = (PSYSTEM_PROCESS_INFORMATION) Current;
|
||||||
|
|
||||||
|
/* Lock the Process */
|
||||||
|
KeEnterCriticalRegion();
|
||||||
|
ExAcquirePushLockShared(&Process->ProcessLock);
|
||||||
|
|
||||||
if ((Process->ProcessExiting) &&
|
if ((Process->ProcessExiting) &&
|
||||||
(Process->Pcb.Header.SignalState) &&
|
(Process->Pcb.Header.SignalState) &&
|
||||||
!(Process->ActiveThreads) &&
|
!(Process->ActiveThreads) &&
|
||||||
|
@ -821,6 +825,10 @@ QSI_DEF(SystemProcessInformation)
|
||||||
Process, Process->ImageFileName, Process->UniqueProcessId);
|
Process, Process->ImageFileName, Process->UniqueProcessId);
|
||||||
CurrentSize = 0;
|
CurrentSize = 0;
|
||||||
ImageNameMaximumLength = 0;
|
ImageNameMaximumLength = 0;
|
||||||
|
|
||||||
|
/* Unlock the Process */
|
||||||
|
ExReleasePushLockShared(&Process->ProcessLock);
|
||||||
|
KeLeaveCriticalRegion();
|
||||||
goto Skip;
|
goto Skip;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -955,6 +963,10 @@ QSI_DEF(SystemProcessInformation)
|
||||||
ProcessImageName = NULL;
|
ProcessImageName = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Unlock the Process */
|
||||||
|
ExReleasePushLockShared(&Process->ProcessLock);
|
||||||
|
KeLeaveCriticalRegion();
|
||||||
|
|
||||||
/* Handle idle process entry */
|
/* Handle idle process entry */
|
||||||
Skip:
|
Skip:
|
||||||
if (Process == PsIdleProcess) Process = NULL;
|
if (Process == PsIdleProcess) Process = NULL;
|
||||||
|
|
Loading…
Reference in a new issue