From 1e579843bcf2f54da8e717ec9713b86e9ad1c02c Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Sun, 18 Mar 2018 18:14:17 +0100 Subject: [PATCH] [NTOSKNRL] Always reference a newly created VACB This allows being consistent between newly created and looked up so that VACB can always safely be released. Should really help with reference issues. CORE-14481 CORE-14480 CORE-14482 --- ntoskrnl/cc/view.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ntoskrnl/cc/view.c b/ntoskrnl/cc/view.c index 6a295504c32..e896c570932 100644 --- a/ntoskrnl/cc/view.c +++ b/ntoskrnl/cc/view.c @@ -808,6 +808,9 @@ CcRosCreateVacb ( ExFreeToNPagedLookasideList(&VacbLookasideList, current); } + /* Reference it to allow release */ + CcRosVacbIncRefCount(current); + return Status; } @@ -842,8 +845,6 @@ CcRosGetVacb ( { return Status; } - - CcRosVacbIncRefCount(current); } KeAcquireGuardedMutex(&ViewLock);