]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
patch 2
authorLiam R. Howlett <Liam.Howlett@oracle.com>
Fri, 16 Jun 2023 18:57:51 +0000 (14:57 -0400)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Fri, 16 Jun 2023 18:57:51 +0000 (14:57 -0400)
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
mm/memory.c

index c291511c3155d0d37812937054d9d306e3c87bef..7e2d473e70bb7033160ec3117535bfcc0e148994 100644 (file)
@@ -5279,8 +5279,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 upgrade_mmap_lock_carefully(struct mm_struct *mm, struct pt_regs *regs)
@@ -5304,8 +5303,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);
 }
 
 /*