summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mm/mmap.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/mm/mmap.c b/mm/mmap.c
index 420088682d4a..ca292a7c2b68 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -2494,11 +2494,9 @@ int vm_munmap(unsigned long start, size_t len)
int ret;
struct mm_struct *mm = current->mm;
- /*
- * XXX convert to down_write_killable as soon as all users are able
- * to handle the error.
- */
- down_write(&mm->mmap_sem);
+ if (down_write_killable(&mm->mmap_sem))
+ return -EINTR;
+
ret = do_munmap(mm, start, len);
up_write(&mm->mmap_sem);
return ret;