From ed58e3df349a5bb5abe9eb2c87104a72f383f7d5 Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Tue, 14 Oct 2008 13:56:58 +0000 Subject: [PATCH] - 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. svn path=/trunk/; revision=36747 --- reactos/ntoskrnl/config/cmparse.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/reactos/ntoskrnl/config/cmparse.c b/reactos/ntoskrnl/config/cmparse.c index 701bda5c175..7e6d9d264c8 100644 --- a/reactos/ntoskrnl/config/cmparse.c +++ b/reactos/ntoskrnl/config/cmparse.c @@ -339,7 +339,7 @@ CmpDoCreateChild(IN PHHIVE Hive, *KeyCell, KeyNode, ParentKcb, - CMP_LOCK_HASHES_FOR_KCB, + 0, // CMP_LOCK_HASHES_FOR_KCB, Name); if (!Kcb) { @@ -492,7 +492,16 @@ CmpDoCreate(IN PHHIVE Hive, 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);