- 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
This commit is contained in:
Aleksey Bragin 2008-10-14 13:56:58 +00:00
parent 685d1fe7e7
commit ed58e3df34

View file

@ -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);