- Acquire ProcessLock before accessing a process's thread list in NtQuerySystemInformation/SystemProcessInformation. Patch by Volodymyr Shcherbyna.
CORE-12001 #resolve
svn path=/trunk/; revision=72873
{
SpiCurrent = (PSYSTEM_PROCESS_INFORMATION) Current;
{
SpiCurrent = (PSYSTEM_PROCESS_INFORMATION) Current;
+ /* Lock the Process */
+ KeEnterCriticalRegion();
+ ExAcquirePushLockShared(&Process->ProcessLock);
+
if ((Process->ProcessExiting) &&
(Process->Pcb.Header.SignalState) &&
!(Process->ActiveThreads) &&
if ((Process->ProcessExiting) &&
(Process->Pcb.Header.SignalState) &&
!(Process->ActiveThreads) &&
Process, Process->ImageFileName, Process->UniqueProcessId);
CurrentSize = 0;
ImageNameMaximumLength = 0;
Process, Process->ImageFileName, Process->UniqueProcessId);
CurrentSize = 0;
ImageNameMaximumLength = 0;
+
+ /* Unlock the Process */
+ ExReleasePushLockShared(&Process->ProcessLock);
+ KeLeaveCriticalRegion();
ProcessImageName = NULL;
}
ProcessImageName = NULL;
}
+ /* Unlock the Process */
+ ExReleasePushLockShared(&Process->ProcessLock);
+ KeLeaveCriticalRegion();
+
/* Handle idle process entry */
Skip:
if (Process == PsIdleProcess) Process = NULL;
/* Handle idle process entry */
Skip:
if (Process == PsIdleProcess) Process = NULL;