[NTOSKRNL] Fail on pinning when there's no pin access set

Instead of assert, now, CcPinRead will just fail. This is
not consistent without Windows behavior, but still better
than asserting while testing!
This commit is contained in:
Pierre Schweitzer
2018-09-01 12:39:05 +02:00
parent a4dc3c4963
commit f96f1224a7

View File

@@ -186,7 +186,11 @@ CcPinMappedData (
SharedCacheMap = FileObject->SectionObjectPointer->SharedCacheMap;
ASSERT(SharedCacheMap);
ASSERT(SharedCacheMap->PinAccess);
if (!SharedCacheMap->PinAccess)
{
DPRINT1("FIXME: Pinning a file with no pin access!\n");
return FALSE;
}
iBcb = *Bcb;
ASSERT(iBcb->Pinned == FALSE);