]> git.baikalelectronics.ru Git - kernel.git/commit
[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)
commit281ce69cb529c8c81acf35718709b196fd73ae65
treeda637c9a708b93bcacc4f4284fba5cc2190c996f
parent265e8107c6cf1c1a0edd5bef68a34d27a9019ec9
[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