aboutsummaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
Diffstat (limited to 'ipc')
-rw-r--r--ipc/shm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ipc/shm.c b/ipc/shm.c
index 9162123a7b23..16fe2786087d 100644
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -814,6 +814,9 @@ asmlinkage long sys_shmdt(char __user *shmaddr)
814 loff_t size = 0; 814 loff_t size = 0;
815 int retval = -EINVAL; 815 int retval = -EINVAL;
816 816
817 if (addr & ~PAGE_MASK)
818 return retval;
819
817 down_write(&mm->mmap_sem); 820 down_write(&mm->mmap_sem);
818 821
819 /* 822 /*