mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
sparc32: fix lock_mm_and_find_vma() conversion
commit0b26eadbf2upstream. The sparc32 conversion to lock_mm_and_find_vma() in commita050ba1e74("mm/fault: convert remaining simple cases to lock_mm_and_find_vma()") missed the fact that we didn't actually have a 'regs' pointer available in the 'force_user_fault()' case. It's there in the regular page fault path ("do_sparc_fault()"), but not the window underflow/overflow paths. Which is all fine - we can just pass in a NULL pointer. The register state is only used to avoid deadlock with kernel faults, which is not the case for any of these register window faults. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Fixes:a050ba1e74("mm/fault: convert remaining simple cases to lock_mm_and_find_vma()") Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Cc: Naresh Kamboju <naresh.kamboju@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
00f04a3385
commit
0a1da2dde4
@@ -309,7 +309,7 @@ static void force_user_fault(unsigned long address, int write)
|
|||||||
|
|
||||||
code = SEGV_MAPERR;
|
code = SEGV_MAPERR;
|
||||||
|
|
||||||
vma = lock_mm_and_find_vma(mm, address, regs);
|
vma = lock_mm_and_find_vma(mm, address, NULL);
|
||||||
if (!vma)
|
if (!vma)
|
||||||
goto bad_area_nosemaphore;
|
goto bad_area_nosemaphore;
|
||||||
code = SEGV_ACCERR;
|
code = SEGV_ACCERR;
|
||||||
|
|||||||
Reference in New Issue
Block a user