From 66bf74d228c9d6443c8408ae6d37ae7c43251f29 Mon Sep 17 00:00:00 2001 From: Serge Gautherie Date: Thu, 25 Apr 2019 03:22:16 +0200 Subject: [PATCH] [NTOSKRNL] Move DPRINT1("Thread wants too much stack\n") around To KiUserModeCallout() from MmGrowKernelStackEx(). As suggested by Thomas Faber: "MmGrowKernelStackEx really shouldn't be DPRINT'ing." CORE-14494 --- ntoskrnl/ke/i386/usercall.c | 10 +++++++++- ntoskrnl/mm/ARM3/procsup.c | 1 - 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ntoskrnl/ke/i386/usercall.c b/ntoskrnl/ke/i386/usercall.c index 8fbed380bb9..8f59f7dc103 100644 --- a/ntoskrnl/ke/i386/usercall.c +++ b/ntoskrnl/ke/i386/usercall.c @@ -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 */ diff --git a/ntoskrnl/mm/ARM3/procsup.c b/ntoskrnl/mm/ARM3/procsup.c index cbc784066a0..6407b7896d0 100644 --- a/ntoskrnl/mm/ARM3/procsup.c +++ b/ntoskrnl/mm/ARM3/procsup.c @@ -405,7 +405,6 @@ MmGrowKernelStackEx(IN PVOID StackPointer, // // Sorry! // - DPRINT1("Thread wants too much stack\n"); return STATUS_STACK_OVERFLOW; }