https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b8e4af606a1291330ebdd…
commit b8e4af606a1291330ebddde58f167e60ac66299f
Author: Pierre Schweitzer <pierre(a)reactos.org>
AuthorDate: Sun Aug 26 22:56:25 2018 +0200
Commit: Pierre Schweitzer <pierre(a)reactos.org>
CommitDate: Sun Aug 26 22:56:25 2018 +0200
[NTOSKRNL] Properly reset pinning state on pinning failure
---
ntoskrnl/cc/pin.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/ntoskrnl/cc/pin.c b/ntoskrnl/cc/pin.c
index 3a0ee6ed9d..65525eed83 100644
--- a/ntoskrnl/cc/pin.c
+++ b/ntoskrnl/cc/pin.c
@@ -191,6 +191,12 @@ CcPinMappedData (
Result = ExAcquireSharedStarveExclusive(&iBcb->Lock, BooleanFlagOn(Flags,
PIN_WAIT));
}
+ if (!Result)
+ {
+ iBcb->Pinned = FALSE;
+ iBcb->Vacb->PinCount--;
+ }
+
return Result;
}