summary refs log tree commit diff
path: root/arch/sparc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2023-06-29 20:41:24 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-07-01 13:16:26 +0200
commit0a1da2dde461cc8adac196a10d76a1fb977b7cdf (patch)
tree13c0ec4c810fab55307baae357a6dbebfcd2586f /arch/sparc
parent00f04a3385f72f0e36f3a217ab5236b94daddb46 (diff)
downloadlinux-0a1da2dde461cc8adac196a10d76a1fb977b7cdf.tar.gz
sparc32: fix lock_mm_and_find_vma() conversion
commit 0b26eadbf200abf6c97c6d870286c73219cdac65 upstream.

The sparc32 conversion to lock_mm_and_find_vma() in commit a050ba1e7422
("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: a050ba1e7422 ("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>
Diffstat (limited to 'arch/sparc')
-rw-r--r--arch/sparc/mm/fault_32.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sparc/mm/fault_32.c b/arch/sparc/mm/fault_32.c
index aef2aebe2379..56eb40d385a8 100644
--- a/arch/sparc/mm/fault_32.c
+++ b/arch/sparc/mm/fault_32.c
@@ -309,7 +309,7 @@ static void force_user_fault(unsigned long address, int write)
 
 	code = SEGV_MAPERR;
 
-	vma = lock_mm_and_find_vma(mm, address, regs);
+	vma = lock_mm_and_find_vma(mm, address, NULL);
 	if (!vma)
 		goto bad_area_nosemaphore;
 	code = SEGV_ACCERR;