]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - ipc/shm.c
[PATCH] shmdt cannot detach not-alined shm segment cleanly.
[linux-2.6-omap-h63xx.git] / ipc / shm.c
index 4c28d2d8e305cca5781f02117b55e9b21922bdd0..9162123a7b23c348aca8669c56ea56bfbeacadb6 100644 (file)
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -870,6 +870,7 @@ asmlinkage long sys_shmdt(char __user *shmaddr)
         * could possibly have landed at. Also cast things to loff_t to
         * prevent overflows and make comparisions vs. equal-width types.
         */
+       size = PAGE_ALIGN(size);
        while (vma && (loff_t)(vma->vm_end - addr) <= size) {
                next = vma->vm_next;