linux-stable/arch/x86/mm
Hugh Dickins 457a98b080 mm, x86: fix pte_page() crash in gup_pte_range()
Commit 3565fce3a6 ("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: Hugh Dickins <hughd@google.com>
Reported-by: Michael Long <Harn-Solo@gmx.de>
Tested-by: Michael Long <Harn-Solo@gmx.de>
Acked-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-02-18 16:23:24 -08:00
..
kmemcheck x86: Replace __get_cpu_var uses 2014-08-26 13:45:49 -04:00
amdtopology.c x86/mm/numa: Simplify some bit mangling 2013-04-10 19:06:26 +02:00
debug_pagetables.c x86/mm/ptdump: Make (debugfs)/kernel_page_tables read-only 2015-12-04 12:55:01 +01:00
dump_pagetables.c Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-01-11 17:16:01 -08:00
extable.c x86, extable: Switch to relative exception table entries 2012-04-20 17:22:34 -07:00
fault.c x86/vm86: Clean up vm86.h includes 2015-07-31 13:31:10 +02:00
gup.c mm, x86: fix pte_page() crash in gup_pte_range() 2016-02-18 16:23:24 -08:00
highmem_32.c kmap_atomic_to_page() has no users, remove it 2015-11-09 15:11:24 -08:00
hugetlbpage.c mm, hugetlb: don't require CMA for runtime gigantic pages 2016-02-05 18:10:40 -08:00
init.c libnvdimm for 4.4: 2015-11-10 12:07:22 -08:00
init_32.c x86/mm: Warn on W^X mappings 2015-10-06 11:11:48 +02:00
init_64.c x86, mm: introduce vmem_altmap to augment vmemmap_populate() 2016-01-15 17:56:32 -08:00
iomap_32.c Merge branch 'x86-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-06-22 17:59:09 -07:00
ioremap.c x86/mm: Drop WARN from multi-BAR check 2015-12-29 12:34:38 +01:00
kasan_init_64.c kasan: update log messages 2015-11-05 19:34:48 -08:00
kmmio.c x86: Delete non-required instances of include <linux/init.h> 2014-01-06 21:25:18 -08:00
Makefile x86/mm: Turn CONFIG_X86_PTDUMP into a module 2015-11-23 10:50:13 +01:00
mm_internal.h x86: Enable PAT to use cache mode translation tables 2014-11-16 11:04:26 +01:00
mmap.c x86: mm: support ARCH_MMAP_RND_BITS 2016-01-14 16:00:49 -08:00
mmio-mod.c x86: delete __cpuinit usage from all x86 files 2013-07-14 19:36:56 -04:00
mpx.c x86/mpx: Fix instruction decoder condition 2015-12-05 18:52:14 +01:00
numa.c x86/mm/numa: Fix 32-bit memblock range truncation bug on 32-bit NUMA kernels 2016-02-08 12:10:03 +01:00
numa_32.c x86: Fix the initialization of physnode_map 2014-02-01 22:15:51 -08:00
numa_64.c x86, mm: kill numa_free_all_bootmem() 2012-11-17 11:59:47 -08:00
numa_emulation.c x86: delete __cpuinit usage from all x86 files 2013-07-14 19:36:56 -04:00
numa_internal.h x86-32, mm: Rip out x86_32 NUMA remapping code 2013-01-31 14:12:30 -08:00
pageattr-test.c x86/mm/pat: Make mm/pageattr[-test].c explicitly non-modular 2015-08-25 09:48:38 +02:00
pageattr.c x86/mm/pat: Avoid truncation when converting cpa->numpages to address 2016-01-29 15:03:09 +01:00
pat.c mm, dax: convert vmf_insert_pfn_pmd() to pfn_t 2016-01-15 17:56:32 -08:00
pat_internal.h x86/mm/pat: Convert to pr_*() usage 2015-05-27 14:40:59 +02:00
pat_rbtree.c x86/mm/pat: Change free_memtype() to support shrinking case 2016-01-05 11:10:23 +01:00
pf_in.c
pf_in.h
pgtable.c x86, thp: remove infrastructure for handling splitting PMDs 2016-01-15 17:56:32 -08:00
pgtable_32.c x86: Remove set_pmd_pfn 2014-09-01 10:15:31 +02:00
physaddr.c x86, mm: Make DEBUG_VIRTUAL work earlier in boot 2013-01-25 16:33:22 -08:00
physaddr.h
setup_nx.c x86/cpufeature: Remove unused and seldomly used cpu_has_xx macros 2015-12-19 11:49:55 +01:00
srat.c x86/mm: Introduce max_possible_pfn 2015-12-06 12:46:31 +01:00
testmmiotrace.c
tlb.c x86/mm: Add barriers and document switch_mm()-vs-flush synchronization 2016-01-11 12:03:15 +01:00