[NTOSKRNL:CC] Fixing Synchronization Bug

Fixing Bug identified by PeyTy
This commit is contained in:
2024-05-18 17:22:16 +02:00
parent 5b5000d7f1
commit 189cf42f74

View File

@@ -45,7 +45,7 @@ CcGetDirtyPages(IN PVOID LogHandle,
if ((SharedCacheMap->Flags & 0x800) != 0)
{
DBGPRINT("CcGetDirtyPages::Invalid Flag \n")
return;
return (LARGE_INTEGER){0};
}
if ((SharedCacheMap->Flags & 0x2000000) != 0 && SharedCacheMap->LogHandle == LogHandle)
@@ -111,11 +111,13 @@ CcGetDirtyPages(IN PVOID LogHandle,
{
BcbToUnpin = Bcb;
}
/*Release the BCB lock*/
KeReleaseInStackQueuedSpinLock(&LockHandle);
}
}
/*Release the BCB lock*/
KeReleaseInStackQueuedSpinLock(&LockHandle);
/* Dereference the shared cache map file object*/
CcDereferenceSharedCacheMapFileObject(SharedCacheMap, FileObject);
@@ -135,6 +137,7 @@ CcGetDirtyPages(IN PVOID LogHandle,
KeReleaseQueuedSpinLock(LockQueueMasterLock,OldIrql);
}
}
return OldestLsn ;
}