mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 04:10:18 +09:00
UPSTREAM: mips/mm: Convert to using lock_mm_and_find_vma()
commit4bce37a68fupstream. Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Samuel Mendoza-Jonas <samjonas@amazon.com> Signed-off-by: David Woodhouse <dwmw@amazon.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Change-Id: Ie1ec8bd98c52086790adcd691370a76d135a333e (cherry picked from commit4bce37a68f) Signed-off-by: Suren Baghdasaryan <surenb@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
9cdce804c0
commit
053053fc68
@@ -93,6 +93,7 @@ config MIPS
|
|||||||
select HAVE_VIRT_CPU_ACCOUNTING_GEN if 64BIT || !SMP
|
select HAVE_VIRT_CPU_ACCOUNTING_GEN if 64BIT || !SMP
|
||||||
select IRQ_FORCED_THREADING
|
select IRQ_FORCED_THREADING
|
||||||
select ISA if EISA
|
select ISA if EISA
|
||||||
|
select LOCK_MM_AND_FIND_VMA
|
||||||
select MODULES_USE_ELF_REL if MODULES
|
select MODULES_USE_ELF_REL if MODULES
|
||||||
select MODULES_USE_ELF_RELA if MODULES && 64BIT
|
select MODULES_USE_ELF_RELA if MODULES && 64BIT
|
||||||
select PERF_USE_VMALLOC
|
select PERF_USE_VMALLOC
|
||||||
|
|||||||
@@ -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);
|
perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, regs, address);
|
||||||
retry:
|
retry:
|
||||||
mmap_read_lock(mm);
|
vma = lock_mm_and_find_vma(mm, address, regs);
|
||||||
vma = find_vma(mm, address);
|
|
||||||
if (!vma)
|
if (!vma)
|
||||||
goto bad_area;
|
goto bad_area_nosemaphore;
|
||||||
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;
|
|
||||||
/*
|
/*
|
||||||
* Ok, we have a good vm_area for this memory access, so
|
* Ok, we have a good vm_area for this memory access, so
|
||||||
* we can handle it..
|
* we can handle it..
|
||||||
*/
|
*/
|
||||||
good_area:
|
|
||||||
si_code = SEGV_ACCERR;
|
si_code = SEGV_ACCERR;
|
||||||
|
|
||||||
if (write) {
|
if (write) {
|
||||||
|
|||||||
Reference in New Issue
Block a user