Skip to content
Commit 457a98b0 authored by Hugh Dickins's avatar Hugh Dickins Committed by Linus Torvalds
Browse files

mm, x86: fix pte_page() crash in gup_pte_range()



Commit 3565fce3 ("mm, x86: get_user_pages() for dax mappings") has
moved up the pte_page(pte) in x86's fast gup_pte_range(), for no
discernible reason: put it back where it belongs, after the pte_flags
check and the pfn_valid cross-check.

That may be the cause of the NULL pointer dereference in
gup_pte_range(), seen when vfio called vaddr_get_pfn() when starting a
qemu-kvm based VM.

Signed-off-by: default avatarHugh Dickins <hughd@google.com>
Reported-by: default avatarMichael Long <Harn-Solo@gmx.de>
Tested-by: default avatarMichael Long <Harn-Solo@gmx.de>
Acked-by: default avatarDan Williams <dan.j.williams@intel.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 0918f1c3
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