diff --git a/ntoskrnl/ps/query.c b/ntoskrnl/ps/query.c index 2c492b654a6..ad281e63c00 100644 --- a/ntoskrnl/ps/query.c +++ b/ntoskrnl/ps/query.c @@ -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;