https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1435ff95b4a1f369a2575…
commit 1435ff95b4a1f369a2575eecafe5981896ba4877
Author: Pierre Schweitzer <pierre(a)reactos.org>
AuthorDate: Fri Dec 21 08:44:14 2018 +0100
Commit: Pierre Schweitzer <pierre(a)reactos.org>
CommitDate: Fri Dec 21 08:46:40 2018 +0100
[NTOSKRNL] Don't call AcquireForLazyWrite with the master lock held
This incorrect behavior was leading to a call at too high IRQL for paged code.
This was triggered by MS FastFAT.
ReleaseFromLazyWrite call was already correctly called to that regard.
CORE-11819
---
ntoskrnl/cc/view.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/ntoskrnl/cc/view.c b/ntoskrnl/cc/view.c
index 81a1dac801..d64496595f 100644
--- a/ntoskrnl/cc/view.c
+++ b/ntoskrnl/cc/view.c
@@ -222,18 +222,19 @@ CcRosFlushDirtyPages (
continue;
}
+ ASSERT(current->Dirty);
+
+ KeReleaseQueuedSpinLock(LockQueueMasterLock, OldIrql);
+
Locked = current->SharedCacheMap->Callbacks->AcquireForLazyWrite(
current->SharedCacheMap->LazyWriteContext, Wait);
if (!Locked)
{
+ OldIrql = KeAcquireQueuedSpinLock(LockQueueMasterLock);
CcRosVacbDecRefCount(current);
continue;
}
- ASSERT(current->Dirty);
-
- KeReleaseQueuedSpinLock(LockQueueMasterLock, OldIrql);
-
Status = CcRosFlushVacb(current);
current->SharedCacheMap->Callbacks->ReleaseFromLazyWrite(