From c477153292b11752b4a9df5ee9ad6ef693e1bc36 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Wed, 17 Aug 2011 23:56:40 +0000 Subject: [PATCH] [NTOSKRNL] - Prevent duplicate processing of device objects when bus relations are invalidated multiple times for the bus PDO svn path=/trunk/; revision=53289 --- reactos/ntoskrnl/io/pnpmgr/pnpmgr.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c b/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c index 2d1ec969313..6f23b1f58a9 100644 --- a/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c +++ b/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c @@ -1392,6 +1392,13 @@ IopActionInterrogateDeviceStack(PDEVICE_NODE DeviceNode, return STATUS_UNSUCCESSFUL; } + /* Skip processing if it was already completed before */ + if (DeviceNode->Flags & DNF_PROCESSED) + { + /* Nothing to do */ + return STATUS_SUCCESS; + } + /* Get Locale ID */ Status = ZwQueryDefaultLocale(FALSE, &LocaleId); if (!NT_SUCCESS(Status)) @@ -1988,7 +1995,7 @@ IopActionConfigureChildServices(PDEVICE_NODE DeviceNode, return STATUS_UNSUCCESSFUL; } - if (!IopDeviceNodeHasFlag(DeviceNode, DNF_DISABLED)) + if (!(DeviceNode->Flags & (DNF_DISABLED | DNF_STARTED | DNF_ADDED))) { WCHAR RegKeyBuffer[MAX_PATH]; UNICODE_STRING RegKey;