Merge branch 'audit.b3' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit...
[linux-2.6.git] / ipc / shm.c
index a88c8a0..6f9615c 100644 (file)
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -814,6 +814,9 @@ asmlinkage long sys_shmdt(char __user *shmaddr)
        loff_t size = 0;
        int retval = -EINVAL;
 
+       if (addr & ~PAGE_MASK)
+               return retval;
+
        down_write(&mm->mmap_sem);
 
        /*