[NTOSKRNL] Move DPRINT1("Thread wants too much stack\n") around
authorSerge Gautherie <reactos-git_serge_171003@gautherie.fr>
Thu, 25 Apr 2019 01:22:16 +0000 (03:22 +0200)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Thu, 15 Aug 2019 16:18:59 +0000 (18:18 +0200)
To KiUserModeCallout() from MmGrowKernelStackEx().

As suggested by Thomas Faber:
"MmGrowKernelStackEx really shouldn't be DPRINT'ing."

CORE-14494

ntoskrnl/ke/i386/usercall.c
ntoskrnl/mm/ARM3/procsup.c

index 8fbed38..8f59f7d 100644 (file)
@@ -282,7 +282,15 @@ KiUserModeCallout(PKCALLOUT_FRAME CalloutFrame)
         Status = MmGrowKernelStack((PVOID)InitialStack);
 
         /* Quit if we failed */
-        if (!NT_SUCCESS(Status)) return Status;
+        if (!NT_SUCCESS(Status))
+        {
+            if (Status == STATUS_STACK_OVERFLOW)
+            {
+                DPRINT1("Thread wants too much stack\n");
+            }
+
+            return Status;
+        }
     }
 
     /* Save the current callback stack and initial stack */
index cbc7840..6407b78 100644 (file)
@@ -405,7 +405,6 @@ MmGrowKernelStackEx(IN PVOID StackPointer,
         //
         // Sorry!
         //
-        DPRINT1("Thread wants too much stack\n");
         return STATUS_STACK_OVERFLOW;
     }