linux-next: build failure after merge of the mm tree

Message ID 20230704122342.4a1e2945@canb.auug.org.au
State New
Headers
Series linux-next: build failure after merge of the mm tree |

Commit Message

Stephen Rothwell July 4, 2023, 2:23 a.m. UTC
  Hi all,

After merging the origin tree, today's linux-next build (arm64 defconfig)
failed like this:

arch/arm64/mm/fault.c: In function 'do_page_fault':
arch/arm64/mm/fault.c:624:9: error: 'vma' undeclared (first use in this function); did you mean 'vmap'?
  624 |         vma = lock_mm_and_find_vma(mm, addr, regs);
      |         ^~~:
      |         vmap

Caused by commit

  ae870a68b5d1 ("arm64/mm: Convert to using lock_mm_and_find_vma()")

interacting with commit

  1e72a0774792 ("mm: disable CONFIG_PER_VMA_LOCK by default until its fixed")

from the mm tree.

I applied the following for today (but have no idea if it is correct).

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 4 Jul 2023 12:14:37 +1000
Subject: [PATCH] fix up for "arm64/mm: Convert to using lock_mm_and_find_vma()"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/arm64/mm/fault.c | 2 --
 1 file changed, 2 deletions(-)
  

Comments

Linus Torvalds July 4, 2023, 2:32 a.m. UTC | #1
On Mon, 3 Jul 2023 at 19:23, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> After merging the origin tree, today's linux-next build (arm64 defconfig)
> failed like this:
>
> arch/arm64/mm/fault.c: In function 'do_page_fault':

Yup, SeongJae Park sent me the same report, and it just made it to
top-of-tree as commit 24be4d0b46bb ("arch/arm64/mm/fault: Fix
undeclared variable error in do_page_fault()")

This was actually an architecture I test myself, but I think UP ends
up turning off CONFIG_PER_VMA_LOCK.

I do wonder how much point there is to have a non-SMP build of
architectures like x86-64 and arm64 at all...

But I guess people still run them in qemu.

             Linus
  
Suren Baghdasaryan July 4, 2023, 5:51 a.m. UTC | #2
On Tue, Jul 4, 2023 at 2:33 AM Linus Torvalds
<torvalds@linux-foundation.org> wrote:
>
> On Mon, 3 Jul 2023 at 19:23, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > After merging the origin tree, today's linux-next build (arm64 defconfig)
> > failed like this:
> >
> > arch/arm64/mm/fault.c: In function 'do_page_fault':
>
> Yup, SeongJae Park sent me the same report, and it just made it to
> top-of-tree as commit 24be4d0b46bb ("arch/arm64/mm/fault: Fix
> undeclared variable error in do_page_fault()")

Thanks for fixing that! I hope to turn CONFIG_PER_VMA_LOCK back on soon.

>
> This was actually an architecture I test myself, but I think UP ends
> up turning off CONFIG_PER_VMA_LOCK.

Yes, CONFIG_PER_VMA_LOCK depends on SMP.

>
> I do wonder how much point there is to have a non-SMP build of
> architectures like x86-64 and arm64 at all...
>
> But I guess people still run them in qemu.
>
>              Linus
  

Patch

diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c
index 9d78ff78b0e3..b8c80f7b8a5f 100644
--- a/arch/arm64/mm/fault.c
+++ b/arch/arm64/mm/fault.c
@@ -536,9 +536,7 @@  static int __kprobes do_page_fault(unsigned long far, unsigned long esr,
 	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;