From d0071adf97e25e85d9d66a53b7930dd999308766 Mon Sep 17 00:00:00 2001 From: Thomas Faber Date: Sun, 5 Apr 2015 08:33:08 +0000 Subject: [PATCH] [NTOSKRNL] - Perform a user-mode wait in NtGetPlugPlayEvent and correctly allow a waiting thread to terminate CORE-9489 #resolve svn path=/trunk/; revision=67057 --- reactos/ntoskrnl/io/pnpmgr/plugplay.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/reactos/ntoskrnl/io/pnpmgr/plugplay.c b/reactos/ntoskrnl/io/pnpmgr/plugplay.c index 97373acd6f7..86f3f5f63a0 100644 --- a/reactos/ntoskrnl/io/pnpmgr/plugplay.c +++ b/reactos/ntoskrnl/io/pnpmgr/plugplay.c @@ -808,12 +808,13 @@ NtGetPlugPlayEvent(IN ULONG Reserved1, DPRINT("Waiting for pnp notification event\n"); Status = KeWaitForSingleObject(&IopPnpNotifyEvent, UserRequest, - KernelMode, + UserMode, FALSE, NULL); - if (!NT_SUCCESS(Status)) + if (!NT_SUCCESS(Status) || Status == STATUS_USER_APC) { - DPRINT1("KeWaitForSingleObject() failed (Status %lx)\n", Status); + DPRINT("KeWaitForSingleObject() failed (Status %lx)\n", Status); + ASSERT(Status == STATUS_USER_APC); return Status; }