[NTOS:PS] Check for rundown success in PsReferenceProcessFilePointer. CID 514553
authorThomas Faber <thomas.faber@reactos.org>
Fri, 26 Jan 2018 12:45:53 +0000 (13:45 +0100)
committerThomas Faber <thomas.faber@reactos.org>
Sun, 28 Jan 2018 09:48:19 +0000 (10:48 +0100)
ntoskrnl/ps/query.c

index 2c492b6..ad281e6 100644 (file)
@@ -28,7 +28,10 @@ PsReferenceProcessFilePointer(IN PEPROCESS Process,
     PAGED_CODE();
 
     /* Lock the process */
-    ExAcquireRundownProtection(&Process->RundownProtect);
+    if (!ExAcquireRundownProtection(&Process->RundownProtect))
+    {
+        return STATUS_PROCESS_IS_TERMINATING;
+    }
 
     /* Get the section */
     Section = Process->SectionObject;