[ros-diffs] [fireball] 36747: - Don't pass CMP_LOCK_HASHES_FOR_KCB flag because no locking is perform in CmpBuildHashStackAndLookupCache, fixes an assert when trying to unlock not locked object. - Add a hack (one and only one) for the MaxNameLen being different in KCB and actual KeyNode to allow regression testing framework go further.

fireball at svn.reactos.org fireball at svn.reactos.org
Tue Oct 14 15:56:59 CEST 2008


Author: fireball
Date: Tue Oct 14 08:56:58 2008
New Revision: 36747

URL: http://svn.reactos.org/svn/reactos?rev=36747&view=rev
Log:
- Don't pass CMP_LOCK_HASHES_FOR_KCB flag because no locking is perform in CmpBuildHashStackAndLookupCache, fixes an assert when trying to unlock not locked object.
- Add a hack (one and only one) for the MaxNameLen being different in KCB and actual KeyNode to allow regression testing framework go further.

Modified:
    trunk/reactos/ntoskrnl/config/cmparse.c

Modified: trunk/reactos/ntoskrnl/config/cmparse.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmparse.c?rev=36747&r1=36746&r2=36747&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/config/cmparse.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/config/cmparse.c [iso-8859-1] Tue Oct 14 08:56:58 2008
@@ -339,7 +339,7 @@
                                    *KeyCell,
                                    KeyNode,
                                    ParentKcb,
-                                   CMP_LOCK_HASHES_FOR_KCB,
+                                   0, // CMP_LOCK_HASHES_FOR_KCB,
                                    Name);
     if (!Kcb)
     {
@@ -492,7 +492,16 @@
         ASSERT(KeyBody->KeyControlBlock->ParentKcb->KeyCell == Cell);
         ASSERT(KeyBody->KeyControlBlock->ParentKcb->KeyHive == Hive);
         ASSERT(KeyBody->KeyControlBlock->ParentKcb == ParentKcb);
-        ASSERT(KeyBody->KeyControlBlock->ParentKcb->KcbMaxNameLen == KeyNode->MaxNameLen);
+        //ASSERT(KeyBody->KeyControlBlock->ParentKcb->KcbMaxNameLen == KeyNode->MaxNameLen);
+        if (KeyBody->KeyControlBlock->ParentKcb->KcbMaxNameLen != KeyNode->MaxNameLen)
+        {
+            /* HACK: this gets unsynced due to (?) mismatching KCB referencing */
+            DPRINT1("BUG: KCB MaxNameLen %d does not match KeyNode's MaxNameLen %d!\n",
+                KeyBody->KeyControlBlock->ParentKcb->KcbMaxNameLen, KeyNode->MaxNameLen);
+
+            /* Manually sync MaxNameLens, remove once fixed */
+            KeyBody->KeyControlBlock->ParentKcb->KcbMaxNameLen = KeyNode->MaxNameLen;
+        }
 
         /* Update the timestamp */
         KeQuerySystemTime(&TimeStamp);



More information about the Ros-diffs mailing list