From 10527bf4050504d662ea0cb71ef5738f4dd17907 Mon Sep 17 00:00:00 2001 From: Dibyamartanda Samanta Date: Wed, 7 Aug 2024 15:09:57 +0200 Subject: [PATCH] [NTOSKRNL:CC] CcSetDirtyPinnedData :: use reconstructed OBCB Structure Their no PBCB anymore, since we reconstructed it by looking at _OBCB which is reconstructed from CcAllocateObcb, we know that bcb array is array of PCC_BCB structure, thus modified CcSetDirtyPinnedData to use OBCB instead --- NTOSKRNL/CC/ccpinsupport.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/NTOSKRNL/CC/ccpinsupport.cpp b/NTOSKRNL/CC/ccpinsupport.cpp index 504ace9..1173f42 100644 --- a/NTOSKRNL/CC/ccpinsupport.cpp +++ b/NTOSKRNL/CC/ccpinsupport.cpp @@ -125,12 +125,12 @@ CcMapDataForOverwrite( VOID NTAPI CcSetDirtyPinnedData( - IN PBCB BcbVoid, + IN POBCB BcbVoid, IN PLARGE_INTEGER Lsn OPTIONAL) { PSHARED_CACHE_MAP SharedCacheMap; - PBCB Bcb; - PBCB* BcbArray; + PCC_BCB Bcb; + PCC_BCB* BcbArray; PFAST_MUTEX Mutex; KIRQL OldIrql; ULONG PagesToWrite; @@ -139,7 +139,7 @@ CcSetDirtyPinnedData( if (BcbVoid->NodeTypeCode == 762) { - BcbArray = (ULONG_PTR)BcbVoid-Bcbs; + BcbArray = reinterpret_cast(BcbVoid->Bcbs); } SharedCacheMap = (*BcbArray)->SharedCacheMap;