From 1f4771d41bd7a8915f62089274166433d9390a7c Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Fri, 10 Sep 2010 21:01:59 +0000 Subject: [PATCH] [NTOS] - Fix a strange bug where we were only setting SharedUserData->TestRetInstruction conditionally only if lookup failed - it should be set on success. Also, bail out if the lookups failed. svn path=/trunk/; revision=48735 --- reactos/ntoskrnl/ps/psmgr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/reactos/ntoskrnl/ps/psmgr.c b/reactos/ntoskrnl/ps/psmgr.c index 9fa513b0f17..d090ab85588 100644 --- a/reactos/ntoskrnl/ps/psmgr.c +++ b/reactos/ntoskrnl/ps/psmgr.c @@ -200,6 +200,7 @@ PspLookupKernelUserEntryPoints(VOID) Status = PspLookupSystemDllEntryPoint("KiFastSystemCallRet", (PVOID)&SharedUserData-> SystemCallReturn); + if (!NT_SUCCESS(Status)) return Status; } else { @@ -207,10 +208,11 @@ PspLookupKernelUserEntryPoints(VOID) Status = PspLookupSystemDllEntryPoint("KiIntSystemCall", (PVOID)&SharedUserData-> SystemCall); + if (!NT_SUCCESS(Status)) return Status; } /* Set the test instruction */ - if (!NT_SUCCESS(Status)) SharedUserData->TestRetInstruction = 0xC3; + SharedUserData->TestRetInstruction = 0xC3; /* Return the status */ return Status;