]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/mm: Fix mmap errno when MAP_FIXED is set and mapping exceeds the allowed...
authorjmarchan@redhat.com <jmarchan@redhat.com>
Wed, 15 Jan 2014 15:27:11 +0000 (16:27 +0100)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 29 Jan 2014 06:02:25 +0000 (17:02 +1100)
commit5c98981a29e9e0c8db6c8ed35783d1badb102100
tree5352397bce49d1c23e8df8fdd58db587a9edbae0
parent5ef67977e9ecef4212f82a3eae649b1e873a96a9
powerpc/mm: Fix mmap errno when MAP_FIXED is set and mapping exceeds the allowed address space

According to Posix, if MAP_FIXED is specified mmap shall set ENOMEM if
the requested mapping exceeds the allowed range for address space of
the process. The generic code set it right, but the specific powerpc
slice_get_unmapped_area() function currently returns -EINVAL in that
case.
This patch corrects it.

Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/mm/slice.c