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.
This commit is contained in:
Jason Johnson 2018-04-24 18:07:02 -04:00 committed by Ged Murphy
parent 9e2dd8676a
commit 054c11a02c

View file

@ -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);