Merge branch 'akpm' (patches from Andrew)
[cascardo/linux.git] / arch / x86 / kernel / sys_x86_64.c
index 10e0272..a55ed63 100644 (file)
@@ -101,7 +101,6 @@ static void find_start_end(unsigned long flags, unsigned long *begin,
                           unsigned long *end)
 {
        if (!test_thread_flag(TIF_ADDR32) && (flags & MAP_32BIT)) {
-               unsigned long new_begin;
                /* This is usually used needed to map code in small
                   model, so it needs to be in the first 31bit. Limit
                   it to that.  This means we need to move the
@@ -112,9 +111,7 @@ static void find_start_end(unsigned long flags, unsigned long *begin,
                *begin = 0x40000000;
                *end = 0x80000000;
                if (current->flags & PF_RANDOMIZE) {
-                       new_begin = randomize_range(*begin, *begin + 0x02000000, 0);
-                       if (new_begin)
-                               *begin = new_begin;
+                       *begin = randomize_page(*begin, 0x02000000);
                }
        } else {
                *begin = current->mm->mmap_legacy_base;