From: Greg Kroah-Hartman Date: Fri, 30 Jun 2023 06:28:44 +0000 (+0200) Subject: 6.3-stable patches X-Git-Tag: v6.4.1~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3fd0507dcc3bc0b831bc671cd38fc79df6cafb6c;p=thirdparty%2Fkernel%2Fstable-queue.git 6.3-stable patches added patches: parisc-fix-expand_stack-conversion.patch --- diff --git a/queue-6.3/parisc-fix-expand_stack-conversion.patch b/queue-6.3/parisc-fix-expand_stack-conversion.patch new file mode 100644 index 00000000000..f87dcb0fb8a --- /dev/null +++ b/queue-6.3/parisc-fix-expand_stack-conversion.patch @@ -0,0 +1,42 @@ +From ea3f8272876f2958463992f6736ab690fde7fa9c Mon Sep 17 00:00:00 2001 +From: Linus Torvalds +Date: Thu, 29 Jun 2023 23:04:57 -0700 +Subject: parisc: fix expand_stack() conversion + +From: Linus Torvalds + +commit ea3f8272876f2958463992f6736ab690fde7fa9c upstream. + +In commit 8d7071af8907 ("mm: always expand the stack with the mmap write +lock held") I tried to deal with the remaining odd page fault handling +cases. The oddest one is ia64, which has stacks that grow both up and +down. And because ia64 was _so_ odd, I asked people to verify the end +result. + +But a close second oddity is parisc, which is the only one that has a +main stack growing up (our "CONFIG_STACK_GROWSUP" config option). But +it looked obvious enough that I didn't worry about it. + +I should have worried a bit more. Not because it was particularly +complex, but because I just used the wrong variable name. + +The previous vma isn't called "prev", it's called "prev_vma". Blush. + +Fixes: 8d7071af8907 ("mm: always expand the stack with the mmap write lock held") +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman +--- + arch/parisc/mm/fault.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/parisc/mm/fault.c ++++ b/arch/parisc/mm/fault.c +@@ -289,7 +289,7 @@ retry: + mmap_read_lock(mm); + vma = find_vma_prev(mm, address, &prev_vma); + if (!vma || address < vma->vm_start) { +- if (!prev || !(prev->vm_flags & VM_GROWSUP)) ++ if (!prev_vma || !(prev_vma->vm_flags & VM_GROWSUP)) + goto bad_area; + vma = expand_stack(mm, address); + if (!vma) diff --git a/queue-6.3/series b/queue-6.3/series index 3cc93a97641..2e8cdadf8b1 100644 --- a/queue-6.3/series +++ b/queue-6.3/series @@ -29,3 +29,4 @@ 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 +parisc-fix-expand_stack-conversion.patch