https://git.reactos.org/?p=reactos.git;a=commitdiff;h=fcf83315dccd67cd9636f…
commit fcf83315dccd67cd9636f9ae08868104a420a3dd
Author: Pierre Schweitzer <pierre(a)reactos.org>
AuthorDate: Fri Apr 27 10:23:06 2018 +0200
Commit: Pierre Schweitzer <pierre(a)reactos.org>
CommitDate: Fri Apr 27 10:23:06 2018 +0200
[NTOSKRNL] Noisily dereference mapped VACB on cache release.
It seems that on process killing, some VACB may be deleted while
still mapped. With current reference counting, they will actually
not be deleted, but leaked, and an ASSERT will be triggered.
CORE-14578
---
ntoskrnl/cc/view.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/ntoskrnl/cc/view.c b/ntoskrnl/cc/view.c
index bd2f4887d4..081d881d15 100644
--- a/ntoskrnl/cc/view.c
+++ b/ntoskrnl/cc/view.c
@@ -1106,6 +1106,12 @@ CcRosDeleteFileCache (
KeReleaseSpinLock(&SharedCacheMap->CacheMapLock, oldIrql);
DPRINT1("Freeing dirty VACB\n");
}
+ if (current->MappedCount != 0)
+ {
+ current->MappedCount = 0;
+ NT_VERIFY(CcRosVacbDecRefCount(current) > 0);
+ DPRINT1("Freeing mapped VACB\n");
+ }
InsertHeadList(&FreeList, ¤t->CacheMapVacbListEntry);
KeAcquireSpinLock(&SharedCacheMap->CacheMapLock, &oldIrql);
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=054c11a02cf4353d38203…
commit 054c11a02cf4353d38203698a0dbe0c360db72d0
Author: Jason Johnson <jasonmjohnson1(a)gmail.com>
AuthorDate: Tue Apr 24 18:07:02 2018 -0400
Commit: Ged Murphy <gedmurphy(a)reactos.org>
CommitDate: Tue Apr 24 23:07:02 2018 +0100
Correctly bugcheck if we aren't returning a usermode thread (#506)
Cause a corresponding bug check to occur for the reason of the user context flag being zero (a system thread), instead of using DbgBreakPoint.
---
ntoskrnl/ke/i386/thrdini.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/ntoskrnl/ke/i386/thrdini.c b/ntoskrnl/ke/i386/thrdini.c
index 683ed88f8d..678bedd113 100644
--- a/ntoskrnl/ke/i386/thrdini.c
+++ b/ntoskrnl/ke/i386/thrdini.c
@@ -78,7 +78,10 @@ KiThreadStartup(VOID)
StartFrame->SystemRoutine(StartFrame->StartRoutine, StartFrame->StartContext);
/* If we returned, we better be a user thread */
- if (!StartFrame->UserThread) DbgBreakPoint();
+ if (!StartFrame->UserThread)
+ {
+ KeBugCheck(NO_USER_MODE_CONTEXT);
+ }
/* Exit to user-mode */
KiServiceExit2(TrapFrame);
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9e2dd8676a787551d0029…
commit 9e2dd8676a787551d0029a51b28b71d478c5c756
Author: Peter Wathall <PeterWathall(a)users.noreply.github.com>
AuthorDate: Tue Apr 24 20:35:23 2018 +0000
Commit: Ged Murphy <gedmurphy(a)reactos.org>
CommitDate: Tue Apr 24 21:35:23 2018 +0100
Removed unreachable line (#517)
The break statement was unnecessary because the goto on the line before it returns from the routine so it can never be reached
---
drivers/storage/class/class2/class2.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/storage/class/class2/class2.c b/drivers/storage/class/class2/class2.c
index 52fdf53d5e..2d29f64575 100644
--- a/drivers/storage/class/class2/class2.c
+++ b/drivers/storage/class/class2/class2.c
@@ -4170,8 +4170,6 @@ Return Value:
IoCompleteRequest(Irp, IO_NO_INCREMENT);
status = STATUS_INSUFFICIENT_RESOURCES;
goto SetStatusAndReturn;
-
- break;
}
irp2->Tail.Overlay.Thread = Irp->Tail.Overlay.Thread;