Message ID | 20230705123425.764300-4-cascardo@canonical.com |
---|---|
State | New |
Headers | show |
Series | CVE-2023-3269 | expand |
diff --git a/mm/memory.c b/mm/memory.c index 195df0ad7450..f154ed8d4980 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -5264,8 +5264,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) @@ -5289,8 +5288,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); } /*