Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit ba0f1987 authored by SeongJae Park's avatar SeongJae Park Committed by Greg Kroah-Hartman
Browse files

arch/arm64/mm/fault: Fix undeclared variable error in do_page_fault()

commit 24be4d0b upstream.

Commit ae870a68 ("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: ae870a68

 ("arm64/mm: Convert to using lock_mm_and_find_vma()")
Signed-off-by: default avatarSeongJae Park <sj@kernel.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 57db8dc0
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment