Author: tfaber
Date: Sun Apr  5 08:33:08 2015
New Revision: 67057

URL: http://svn.reactos.org/svn/reactos?rev=67057&view=rev
Log:
[NTOSKRNL]
- Perform a user-mode wait in NtGetPlugPlayEvent and correctly allow a waiting 
thread to terminate
CORE-9489 #resolve

Modified:
    trunk/reactos/ntoskrnl/io/pnpmgr/plugplay.c

Modified: trunk/reactos/ntoskrnl/io/pnpmgr/plugplay.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/pnpmgr/plugplay.c?rev=67057&r1=67056&r2=67057&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/io/pnpmgr/plugplay.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/io/pnpmgr/plugplay.c [iso-8859-1] Sun Apr  5 
08:33:08 2015
@@ -808,12 +808,13 @@
     DPRINT("Waiting for pnp notification event\n");
     Status = KeWaitForSingleObject(&IopPnpNotifyEvent,
                                    UserRequest,
-                                   KernelMode,
+                                   UserMode,
                                    FALSE,
                                    NULL);
-    if (!NT_SUCCESS(Status))
-    {
-        DPRINT1("KeWaitForSingleObject() failed (Status %lx)\n", Status);
+    if (!NT_SUCCESS(Status) || Status == STATUS_USER_APC)
+    {
+        DPRINT("KeWaitForSingleObject() failed (Status %lx)\n", Status);
+        ASSERT(Status == STATUS_USER_APC);
         return Status;
     }
 


Reply via email to