From 7e18d05872ea2556386d877dd2cfc12e41d9203f Mon Sep 17 00:00:00 2001 From: Alex Ionescu Date: Thu, 12 Sep 2013 07:55:45 +0000 Subject: [PATCH] [NTOSKRNL]: Fix the fix svn path=/trunk/; revision=60056 --- reactos/ntoskrnl/mm/section.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/reactos/ntoskrnl/mm/section.c b/reactos/ntoskrnl/mm/section.c index 96c71057dee..53b38f143f5 100644 --- a/reactos/ntoskrnl/mm/section.c +++ b/reactos/ntoskrnl/mm/section.c @@ -4871,17 +4871,6 @@ MmCreateSection (OUT PVOID * Section, ULONG Protection; PROS_SECTION_OBJECT *SectionObject = (PROS_SECTION_OBJECT *)Section; - /* Convert section flag to page flag */ - if (AllocationAttributes & SEC_NOCACHE) SectionPageProtection |= PAGE_NOCACHE; - - /* Check to make sure the protection is correct. Nt* does this already */ - Protection = MiMakeProtectionMask(SectionPageProtection); - if (Protection == MM_INVALID_PROTECTION) - { - DPRINT1("Page protection is invalid\n"); - return STATUS_INVALID_PAGE_PROTECTION; - } - /* Check if an ARM3 section is being created instead */ if (!(AllocationAttributes & (SEC_IMAGE | SEC_PHYSICALMEMORY))) { @@ -4898,6 +4887,17 @@ MmCreateSection (OUT PVOID * Section, } } + /* Convert section flag to page flag */ + if (AllocationAttributes & SEC_NOCACHE) SectionPageProtection |= PAGE_NOCACHE; + + /* Check to make sure the protection is correct. Nt* does this already */ + Protection = MiMakeProtectionMask(SectionPageProtection); + if (Protection == MM_INVALID_PROTECTION) + { + DPRINT1("Page protection is invalid\n"); + return STATUS_INVALID_PAGE_PROTECTION; + } + /* Check if this is going to be a data or image backed file section */ if ((FileHandle) || (FileObject)) {