From: Greg Kroah-Hartman Date: Tue, 4 Jul 2023 06:58:43 +0000 (+0100) Subject: 6.4-stable patches X-Git-Tag: v5.15.120~9 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=63b497690ce6c4593fc12122210138015ac5869c;p=thirdparty%2Fkernel%2Fstable-queue.git 6.4-stable patches added patches: arch-arm64-mm-fault-fix-undeclared-variable-error-in-do_page_fault.patch --- diff --git a/queue-6.4/arch-arm64-mm-fault-fix-undeclared-variable-error-in-do_page_fault.patch b/queue-6.4/arch-arm64-mm-fault-fix-undeclared-variable-error-in-do_page_fault.patch new file mode 100644 index 00000000000..421aa1e4340 --- /dev/null +++ b/queue-6.4/arch-arm64-mm-fault-fix-undeclared-variable-error-in-do_page_fault.patch @@ -0,0 +1,45 @@ +From 24be4d0b46bb0c3c1dc7bacd30957d6144a70dfc Mon Sep 17 00:00:00 2001 +From: SeongJae Park +Date: Tue, 4 Jul 2023 01:00:03 +0000 +Subject: arch/arm64/mm/fault: Fix undeclared variable error in do_page_fault() + +From: SeongJae Park + +commit 24be4d0b46bb0c3c1dc7bacd30957d6144a70dfc upstream. + +Commit ae870a68b5d1 ("arm64/mm: Convert to using +lock_mm_and_find_vma()") made do_page_fault() to use 'vma' even if +CONFIG_PER_VMA_LOCK is not defined, but the declaration is still in the +ifdef. + +As a result, building kernel without the config fails with undeclared +variable error as below: + + arch/arm64/mm/fault.c: In function 'do_page_fault': + arch/arm64/mm/fault.c:624:2: error: 'vma' undeclared (first use in this function); did you mean 'vmap'? + 624 | vma = lock_mm_and_find_vma(mm, addr, regs); + | ^~~ + | vmap + +Fix it by moving the declaration out of the ifdef. + +Fixes: ae870a68b5d1 ("arm64/mm: Convert to using lock_mm_and_find_vma()") +Signed-off-by: SeongJae Park +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman +--- + arch/arm64/mm/fault.c | 2 -- + 1 file changed, 2 deletions(-) + +--- a/arch/arm64/mm/fault.c ++++ b/arch/arm64/mm/fault.c +@@ -522,9 +522,7 @@ static int __kprobes do_page_fault(unsig + unsigned long vm_flags; + unsigned int mm_flags = FAULT_FLAG_DEFAULT; + unsigned long addr = untagged_addr(far); +-#ifdef CONFIG_PER_VMA_LOCK + struct vm_area_struct *vma; +-#endif + + if (kprobe_page_fault(regs, esr)) + return 0; diff --git a/queue-6.4/series b/queue-6.4/series index 41f4b012fec..36a2e61daaa 100644 --- a/queue-6.4/series +++ b/queue-6.4/series @@ -11,3 +11,4 @@ scripts-tags.sh-resolve-gtags-empty-index-generation.patch docs-set-minimal-gtags-gnu-global-version-to-6.6.5.patch dm-ioctl-avoid-double-fetch-of-version.patch drm-amdgpu-validate-vm-ioctl-flags.patch +arch-arm64-mm-fault-fix-undeclared-variable-error-in-do_page_fault.patch