linux/arch/x86/mm
Dave Hansen 60f583d56a x86: Do not try to sync identity map for non-mapped pages
kernel_map_sync_memtype() is called from a variety of contexts.  The
pat.c code that calls it seems to ensure that it is not called for
non-ram areas by checking via pat_pagerange_is_ram().  It is important
that it only be called on the actual identity map because there *IS*
no map to sync for highmem pages, or for memory holes.

The ioremap.c uses are not as careful as those from pat.c, and call
kernel_map_sync_memtype() on PCI space which is in the middle of the
kernel identity map _range_, but is not actually mapped.

This patch adds a check to kernel_map_sync_memtype() which probably
duplicates some of the checks already in pat.c.  But, it is necessary
for the ioremap.c uses and shouldn't hurt other callers.

I have reproduced this bug and this patch fixes it for me and the
original bug reporter:

	https://lkml.org/lkml/2013/2/5/396

Signed-off-by: Dave Hansen <dave@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/r/20130307163151.D9B58C4E@kernel.stglabs.ibm.com
Signed-off-by: Dave Hansen <dave@sr71.net>
Tested-by: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2013-03-07 13:23:28 -08:00
..
kmemcheck
amdtopology.c
dump_pagetables.c
extable.c
fault.c Revert "x86, mm: Make spurious_fault check explicitly check explicitly check the PRESENT bit" 2013-02-24 13:01:44 +01:00
gup.c
highmem_32.c
hugetlbpage.c mm: use vm_unmapped_area() in hugetlbfs on i386 architecture 2012-12-11 17:22:25 -08:00
init_32.c memory-hotplug: introduce new arch_remove_memory() for removing page table 2013-02-23 17:50:12 -08:00
init_64.c memory-hotplug: remove memmap of sparse-vmemmap 2013-02-23 17:50:12 -08:00
init.c x86, mm: Make sure to find a 2M free block for the first mapped area 2013-03-06 20:18:32 -08:00
iomap_32.c
ioremap.c Revert "x86, mm: Include the entire kernel memory map in trampoline_pgd" 2012-12-15 12:29:54 -08:00
kmmio.c
Makefile
memtest.c x86/memtest: Shorten time for tests 2013-02-18 09:28:42 +01:00
mm_internal.h
mmap.c
mmio-mod.c
numa_32.c x86-32, mm: Rip out x86_32 NUMA remapping code 2013-01-31 14:12:30 -08:00
numa_64.c
numa_emulation.c
numa_internal.h x86-32, mm: Rip out x86_32 NUMA remapping code 2013-01-31 14:12:30 -08:00
numa.c x86, ACPI, mm: Revert movablemem_map support 2013-03-02 09:34:39 -08:00
pageattr-test.c
pageattr.c Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2013-02-26 19:45:29 -08:00
pat_internal.h
pat_rbtree.c
pat.c x86: Do not try to sync identity map for non-mapped pages 2013-03-07 13:23:28 -08:00
pf_in.c
pf_in.h
pgtable_32.c
pgtable.c Linux 3.8-rc5 2013-01-25 16:31:21 -08: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
srat.c x86, ACPI, mm: Revert movablemem_map support 2013-03-02 09:34:39 -08:00
testmmiotrace.c
tlb.c x86: Convert a few mistaken __cpuinit annotations to __init 2013-01-24 17:12:19 +01:00