]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.1-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 30 Jun 2023 05:59:11 +0000 (07:59 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 30 Jun 2023 05:59:11 +0000 (07:59 +0200)
added patches:
sparc32-fix-lock_mm_and_find_vma-conversion.patch

queue-6.1/series
queue-6.1/sparc32-fix-lock_mm_and_find_vma-conversion.patch [new file with mode: 0644]

index 400869f329e371cd88194ad6c5a46e867b02c5d1..5c4bfc7b0f95e3bf1adfe97bb30c9d500a636d9b 100644 (file)
@@ -29,3 +29,4 @@ hid-hidraw-fix-data-race-on-device-refcount.patch
 hid-wacom-use-ktime_t-rather-than-int-when-dealing-with-timestamps.patch
 hid-logitech-hidpp-add-hidpp_quirk_delayed_init-for-the-t651.patch
 revert-thermal-drivers-mediatek-use-devm_of_iomap-to-avoid-resource-leak-in-mtk_thermal_probe.patch
+sparc32-fix-lock_mm_and_find_vma-conversion.patch
diff --git a/queue-6.1/sparc32-fix-lock_mm_and_find_vma-conversion.patch b/queue-6.1/sparc32-fix-lock_mm_and_find_vma-conversion.patch
new file mode 100644 (file)
index 0000000..3a5523d
--- /dev/null
@@ -0,0 +1,41 @@
+From 0b26eadbf200abf6c97c6d870286c73219cdac65 Mon Sep 17 00:00:00 2001
+From: Linus Torvalds <torvalds@linux-foundation.org>
+Date: Thu, 29 Jun 2023 20:41:24 -0700
+Subject: sparc32: fix lock_mm_and_find_vma() conversion
+
+From: Linus Torvalds <torvalds@linux-foundation.org>
+
+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>
+---
+ arch/sparc/mm/fault_32.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/sparc/mm/fault_32.c
++++ b/arch/sparc/mm/fault_32.c
+@@ -309,7 +309,7 @@ static void force_user_fault(unsigned lo
+       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;