Skip to content

Commit 0a1da2d

Browse files
torvaldsgregkh
authored andcommitted
sparc32: fix lock_mm_and_find_vma() conversion
commit 0b26ead upstream. The sparc32 conversion to lock_mm_and_find_vma() in commit a050ba1 ("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 <[email protected]> Fixes: a050ba1 ("mm/fault: convert remaining simple cases to lock_mm_and_find_vma()") Signed-off-by: Linus Torvalds <[email protected]> Cc: Naresh Kamboju <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 00f04a3 commit 0a1da2d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/sparc/mm/fault_32.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ static void force_user_fault(unsigned long address, int write)
309309

310310
code = SEGV_MAPERR;
311311

312-
vma = lock_mm_and_find_vma(mm, address, regs);
312+
vma = lock_mm_and_find_vma(mm, address, NULL);
313313
if (!vma)
314314
goto bad_area_nosemaphore;
315315
code = SEGV_ACCERR;

0 commit comments

Comments
 (0)