mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-24 19:40:21 +09:00
xtensa: fix lock_mm_and_find_vma in case VMA not found
commit03f889378fupstream. MMU version of lock_mm_and_find_vma releases the mm lock before returning when VMA is not found. Do the same in noMMU version. This fixes hang on an attempt to handle protection fault. Fixes:d85a143b69("xtensa: fix NOMMU build with lock_mm_and_find_vma() conversion") Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
0f4ac6b4c5
commit
6b2849b3e0
@@ -688,8 +688,13 @@ EXPORT_SYMBOL(find_vma);
|
||||
struct vm_area_struct *lock_mm_and_find_vma(struct mm_struct *mm,
|
||||
unsigned long addr, struct pt_regs *regs)
|
||||
{
|
||||
struct vm_area_struct *vma;
|
||||
|
||||
mmap_read_lock(mm);
|
||||
return vma_lookup(mm, addr);
|
||||
vma = vma_lookup(mm, addr);
|
||||
if (!vma)
|
||||
mmap_read_unlock(mm);
|
||||
return vma;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user