summaryrefslogtreecommitdiff
path: root/arch/powerpc/kernel/syscalls.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/syscalls.c')
-rw-r--r--arch/powerpc/kernel/syscalls.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/syscalls.c b/arch/powerpc/kernel/syscalls.c
index 4fe69ca24481..c04832c4a02e 100644
--- a/arch/powerpc/kernel/syscalls.c
+++ b/arch/powerpc/kernel/syscalls.c
@@ -143,6 +143,9 @@ static inline unsigned long do_mmap2(unsigned long addr, size_t len,
struct file * file = NULL;
unsigned long ret = -EINVAL;
+ if (!arch_validate_prot(prot))
+ goto out;
+
if (shift) {
if (off & ((1 << shift) - 1))
goto out;