powerpc/mm/hash: Handle mmap_min_addr correctly in get_unmapped_area topdown search
authorAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Tue, 26 Feb 2019 04:39:35 +0000 (10:09 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 May 2019 05:21:54 +0000 (07:21 +0200)
commitc7e220eff8741d6c7d8cb4780a8f277bd6f80d30
tree6eb27bb4a6d4d126abdf6e778af7a5f1cd702a1d
parenta78c3898de59bf790f0f98fd4c087505d1a16007
powerpc/mm/hash: Handle mmap_min_addr correctly in get_unmapped_area topdown search

commit 3b4d07d2674f6b4a9281031f99d1f7efd325b16d upstream.

When doing top-down search the low_limit is not PAGE_SIZE but rather
max(PAGE_SIZE, mmap_min_addr). This handle cases in which mmap_min_addr >
PAGE_SIZE.

Fixes: fba2369e6ceb ("mm: use vm_unmapped_area() on powerpc architecture")
Reviewed-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/mm/slice.c