summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--mm/memory.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/mm/memory.c b/mm/memory.c
index 04a7c3540247..ade4d9eb52d8 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -5275,8 +5275,7 @@ static inline bool get_mmap_lock_carefully(struct mm_struct *mm, struct pt_regs
 			return false;
 	}
 
-	mmap_read_lock(mm);
-	return true;
+	return !mmap_read_lock_killable(mm);
 }
 
 static inline bool mmap_upgrade_trylock(struct mm_struct *mm)
@@ -5300,8 +5299,7 @@ static inline bool upgrade_mmap_lock_carefully(struct mm_struct *mm, struct pt_r
 		if (!search_exception_tables(ip))
 			return false;
 	}
-	mmap_write_lock(mm);
-	return true;
+	return !mmap_write_lock_killable(mm);
 }
 
 /*