[ros-diffs] [cgutman] 53289: [NTOSKRNL] - Prevent duplicate processing of device objects when bus relations are invalidated multiple times for the bus PDO

cgutman at svn.reactos.org cgutman at svn.reactos.org
Wed Aug 17 23:56:42 UTC 2011


Author: cgutman
Date: Wed Aug 17 23:56:40 2011
New Revision: 53289

URL: http://svn.reactos.org/svn/reactos?rev=53289&view=rev
Log:
[NTOSKRNL]
- Prevent duplicate processing of device objects when bus relations are invalidated multiple times for the bus PDO

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

Modified: trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c?rev=53289&r1=53288&r2=53289&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c [iso-8859-1] Wed Aug 17 23:56:40 2011
@@ -1392,6 +1392,13 @@
       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 @@
       return STATUS_UNSUCCESSFUL;
    }
 
-   if (!IopDeviceNodeHasFlag(DeviceNode, DNF_DISABLED))
+   if (!(DeviceNode->Flags & (DNF_DISABLED | DNF_STARTED | DNF_ADDED)))
    {
       WCHAR RegKeyBuffer[MAX_PATH];
       UNICODE_STRING RegKey;




More information about the Ros-diffs mailing list