diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/mm/slice.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/mm/slice.c b/arch/powerpc/mm/slice.c index f833dba2a028..d5fd3909d13a 100644 --- a/arch/powerpc/mm/slice.c +++ b/arch/powerpc/mm/slice.c | |||
@@ -405,6 +405,8 @@ unsigned long slice_get_unmapped_area(unsigned long addr, unsigned long len, | |||
405 | 405 | ||
406 | if (len > mm->task_size) | 406 | if (len > mm->task_size) |
407 | return -ENOMEM; | 407 | return -ENOMEM; |
408 | if (len & ((1ul << pshift) - 1)) | ||
409 | return -EINVAL; | ||
408 | if (fixed && (addr & ((1ul << pshift) - 1))) | 410 | if (fixed && (addr & ((1ul << pshift) - 1))) |
409 | return -EINVAL; | 411 | return -EINVAL; |
410 | if (fixed && addr > (mm->task_size - len)) | 412 | if (fixed && addr > (mm->task_size - len)) |