Skip to content

Commit 24be4d0

Browse files
sjp38torvalds
authored andcommitted
arch/arm64/mm/fault: Fix undeclared variable error in do_page_fault()
Commit ae870a6 ("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: ae870a6 ("arm64/mm: Convert to using lock_mm_and_find_vma()") Signed-off-by: SeongJae Park <sj@kernel.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent e50df24 commit 24be4d0

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

arch/arm64/mm/fault.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -536,9 +536,7 @@ static int __kprobes do_page_fault(unsigned long far, unsigned long esr,
536536
unsigned long vm_flags;
537537
unsigned int mm_flags = FAULT_FLAG_DEFAULT;
538538
unsigned long addr = untagged_addr(far);
539-
#ifdef CONFIG_PER_VMA_LOCK
540539
struct vm_area_struct *vma;
541-
#endif
542540

543541
if (kprobe_page_fault(regs, esr))
544542
return 0;

0 commit comments

Comments
 (0)