From: Hartmut Birr Date: Sun, 30 Oct 2005 13:54:02 +0000 (+0000) Subject: Map the NLS tables after creating the PEB. X-Git-Tag: backups/ros-branch-0_2_9@19949~1004 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=34e6e97b69e030e9daadea72e0fc41ccc3e8baa9;hp=9be78e0815d013b7809328b80dfb42283933d738;ds=sidebyside Map the NLS tables after creating the PEB. The top-down mapping of the NLS tables may occupied the region for the PEB. svn path=/trunk/; revision=18881 --- diff --git a/reactos/ntoskrnl/mm/process.c b/reactos/ntoskrnl/mm/process.c index b07b5da887e..3577dd27dd1 100644 --- a/reactos/ntoskrnl/mm/process.c +++ b/reactos/ntoskrnl/mm/process.c @@ -203,6 +203,14 @@ MmCreatePeb(PEPROCESS Process) DPRINT("MmCreatePeb\n"); + /* Allocate the PEB */ + Peb = MiCreatePebOrTeb(Process, (PVOID)PEB_BASE); + if (Peb != (PVOID)PEB_BASE) + { + DPRINT1("MiCreatePebOrTeb() returned %x\n", Peb); + return STATUS_UNSUCCESSFUL; + } + /* Map NLS Tables */ DPRINT("Mapping NLS\n"); Status = MmMapViewOfSection(NlsSectionObject, @@ -225,9 +233,6 @@ MmCreatePeb(PEPROCESS Process) /* Attach to Process */ KeAttachProcess(&Process->Pcb); - /* Allocate the PEB */ - Peb = MiCreatePebOrTeb(Process, (PVOID)PEB_BASE); - /* Initialize the PEB */ DPRINT("Allocated: %x\n", Peb); RtlZeroMemory(Peb, sizeof(PEB));