[POWERPC] Fix bogus BUG_ON() in in hugetlb_get_unmapped_area()
authorDavid Gibson <david@gibson.dropbear.id.au>
Thu, 21 Dec 2006 22:23:03 +0000 (09:23 +1100)
committerPaul Mackerras <paulus@samba.org>
Tue, 9 Jan 2007 06:03:01 +0000 (17:03 +1100)
commit6aa3e1e9447134ccda8b04b91c4ba8182274a78e
treeda637c9a708b93bcacc4f4284fba5cc2190c996f
parentefa06708fe77190f31bed5c3cb5da49e211240f5
[POWERPC] Fix bogus BUG_ON() in in hugetlb_get_unmapped_area()

The powerpc specific version of hugetlb_get_unmapped_area() makes some
unwarranted assumptions about what checks have been made to its
parameters by its callers.  This will lead to a BUG_ON() if a 32-bit
process attempts to make a hugepage mapping which extends above
TASK_SIZE (4GB).

I'm not sure if these assumptions came about because they were valid
with earlier versions of the get_unmapped_area() path, or if it was
always broken.  Nonetheless this patch fixes the logic, and removes
the crash.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/mm/hugetlbpage.c