summaryrefslogtreecommitdiff
path: root/arch/mips/mm
diff options
context:
space:
mode:
authorBen Hutchings <ben@decadent.org.uk>2023-06-22 19:47:40 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2023-06-25 00:12:58 +0300
commit4bce37a68ff884e821a02a731897a8119e0c37b7 (patch)
treedcf8d2f5d6a940480fa1460841bd1aab472375c5 /arch/mips/mm
parente6fe228c4ffafdfc970cf6d46883a1f481baf7ea (diff)
downloadlinux-4bce37a68ff884e821a02a731897a8119e0c37b7.tar.xz
mips/mm: Convert to using lock_mm_and_find_vma()
Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/mips/mm')
-rw-r--r--arch/mips/mm/fault.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/arch/mips/mm/fault.c b/arch/mips/mm/fault.c
index a27045f5a556..d7878208bd3f 100644
--- a/arch/mips/mm/fault.c
+++ b/arch/mips/mm/fault.c
@@ -99,21 +99,13 @@ static void __do_page_fault(struct pt_regs *regs, unsigned long write,
perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, regs, address);
retry:
- mmap_read_lock(mm);
- vma = find_vma(mm, address);
+ vma = lock_mm_and_find_vma(mm, address, regs);
if (!vma)
- goto bad_area;
- if (vma->vm_start <= address)
- goto good_area;
- if (!(vma->vm_flags & VM_GROWSDOWN))
- goto bad_area;
- if (expand_stack(vma, address))
- goto bad_area;
+ goto bad_area_nosemaphore;
/*
* Ok, we have a good vm_area for this memory access, so
* we can handle it..
*/
-good_area:
si_code = SEGV_ACCERR;
if (write) {