Author: cgutman
Date: Mon Dec 19 09:33:40 2011
New Revision: 54694
URL:
http://svn.reactos.org/svn/reactos?rev=54694&view=rev
Log:
[NTOSKRNL]
- Lock the registry before flushing hives to avoid, among other things, use of an
ERESOURCE without being inside a critical region
Modified:
trunk/reactos/ntoskrnl/config/cmsysini.c
Modified: trunk/reactos/ntoskrnl/config/cmsysini.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmsysini.c…
==============================================================================
--- trunk/reactos/ntoskrnl/config/cmsysini.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/config/cmsysini.c [iso-8859-1] Mon Dec 19 09:33:40 2011
@@ -1933,9 +1933,13 @@
NTAPI
CmShutdownSystem(VOID)
{
- /* Kill the workers and flush all hives */
+ /* Kill the workers */
if (!CmFirstTime) CmpShutdownWorkers();
+
+ /* Flush all hives */
+ CmpLockRegistryExclusive();
CmpDoFlushAll(TRUE);
+ CmpUnlockRegistry();
}
VOID