[NTOSKNRL] In case we leak a VACB, debug as much information as possible.

CORE-14578
This commit is contained in:
Pierre Schweitzer 2018-04-27 14:14:56 +02:00
parent fcf83315dc
commit 579a784e04
No known key found for this signature in database
GPG key ID: 7545556C3D585B0B

View file

@ -1132,7 +1132,25 @@ CcRosDeleteFileCache (
current = CONTAINING_RECORD(current_entry, ROS_VACB, CacheMapVacbListEntry);
InitializeListHead(&current->CacheMapVacbListEntry);
Refs = CcRosVacbDecRefCount(current);
#if DBG // CORE-14578
if (Refs != 0)
{
DPRINT1("Leaking VACB %p attached to %p (%I64d)\n", current, FileObject, current->FileOffset.QuadPart);
DPRINT1("There are: %d references left\n", Refs);
DPRINT1("Pin: %d, Map: %d\n", current->PinCount, current->MappedCount);
DPRINT1("Dirty: %d\n", current->Dirty);
if (FileObject->FileName.Length != 0)
{
DPRINT1("File was: %wZ\n", &FileObject->FileName);
}
else
{
DPRINT1("No name for the file\n");
}
}
#else
ASSERT(Refs == 0);
#endif
}
OldIrql = KeAcquireQueuedSpinLock(LockQueueMasterLock);