Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target...
[linux-2.6-block.git] / mm / mprotect.c
index b650c5412f5884b4b05da98ab8d9995695fc7baf..5019a1ef2848466be4485a0b09b3c689afda2e97 100644 (file)
@@ -379,7 +379,8 @@ SYSCALL_DEFINE3(mprotect, unsigned long, start, size_t, len,
 
        reqprot = prot;
 
-       down_write(&current->mm->mmap_sem);
+       if (down_write_killable(&current->mm->mmap_sem))
+               return -EINTR;
 
        vma = find_vma(current->mm, start);
        error = -ENOMEM;