Upgrade to 4.4.50-rt62
[kvmfornfv.git] / kernel / arch / x86 / mm / mmap.c
index 844b06d..307f60e 100644 (file)
@@ -93,18 +93,6 @@ static unsigned long mmap_base(unsigned long rnd)
        return PAGE_ALIGN(TASK_SIZE - gap - rnd);
 }
 
-/*
- * Bottom-up (legacy) layout on X86_32 did not support randomization, X86_64
- * does, but not when emulating X86_32
- */
-static unsigned long mmap_legacy_base(unsigned long rnd)
-{
-       if (mmap_is_ia32())
-               return TASK_UNMAPPED_BASE;
-       else
-               return TASK_UNMAPPED_BASE + rnd;
-}
-
 /*
  * This function, called very early during the creation of a new
  * process VM image, sets up which VM layout function to use:
@@ -116,7 +104,7 @@ void arch_pick_mmap_layout(struct mm_struct *mm)
        if (current->flags & PF_RANDOMIZE)
                random_factor = arch_mmap_rnd();
 
-       mm->mmap_legacy_base = mmap_legacy_base(random_factor);
+       mm->mmap_legacy_base = TASK_UNMAPPED_BASE + random_factor;
 
        if (mmap_is_legacy()) {
                mm->mmap_base = mm->mmap_legacy_base;