Subject: powerpc: slice fix test size From: Benjamin Herrenschmidt Fix testing of size for non standard mappings in slice code Signed-off-by: Arnd Bergmann Index: linux-2.6/arch/powerpc/mm/slice.c =================================================================== --- linux-2.6.orig/arch/powerpc/mm/slice.c +++ linux-2.6/arch/powerpc/mm/slice.c @@ -405,6 +405,8 @@ unsigned long slice_get_unmapped_area(un if (len > mm->task_size) return -ENOMEM; + if (len & ((1ul << pshift) - 1)) + return -EINVAL; if (fixed && (addr & ((1ul << pshift) - 1))) return -EINVAL; if (fixed && addr > (mm->task_size - len))