[NTOS]
authorAleksey Bragin <aleksey@reactos.org>
Fri, 10 Sep 2010 21:01:59 +0000 (21:01 +0000)
committerAleksey Bragin <aleksey@reactos.org>
Fri, 10 Sep 2010 21:01:59 +0000 (21:01 +0000)
- 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

index 9fa513b..d090ab8 100644 (file)
@@ -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;