https://git.reactos.org/?p=reactos.git;a=commitdiff;h=579a784e0431e5400daca…
commit 579a784e0431e5400dacaf39ee6d97b0a380ebe9
Author: Pierre Schweitzer <pierre(a)reactos.org>
AuthorDate: Fri Apr 27 14:14:56 2018 +0200
Commit: Pierre Schweitzer <pierre(a)reactos.org>
CommitDate: Fri Apr 27 14:14:56 2018 +0200
[NTOSKNRL] In case we leak a VACB, debug as much information as possible.
CORE-14578
---
ntoskrnl/cc/view.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/ntoskrnl/cc/view.c b/ntoskrnl/cc/view.c
index 081d881d15..a0f0867080 100644
--- a/ntoskrnl/cc/view.c
+++ b/ntoskrnl/cc/view.c
@@ -1132,7 +1132,25 @@ CcRosDeleteFileCache (
current = CONTAINING_RECORD(current_entry, ROS_VACB, CacheMapVacbListEntry);
InitializeListHead(¤t->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);