android_kernel_sony_msm8994/mm
Kirill A. Shutemov 4d37e24817 mm: avoid setting up anonymous pages into file mapping
commit 6b7339f4c31ad69c8e9c0b2859276e22cf72176d upstream.

Reading page fault handler code I've noticed that under right
circumstances kernel would map anonymous pages into file mappings: if
the VMA doesn't have vm_ops->fault() and the VMA wasn't fully populated
on ->mmap(), kernel would handle page fault to not populated pte with
do_anonymous_page().

Let's change page fault handler to use do_anonymous_page() only on
anonymous VMA (->vm_ops == NULL) and make sure that the VMA is not
shared.

For file mappings without vm_ops->fault() or shred VMA without vm_ops,
page fault on pte_none() entry would lead to SIGBUS.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Acked-by: Oleg Nesterov <oleg@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Willy Tarreau <w@1wt.eu>
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-repo: https://kernel.googlesource.com/pub/scm/linux/kernel/git/stable/linux-stable
Git-commit: efcbc94afe6dd0f8a4b112a0f3385cdc89ea58ba
Change-Id: Ifab61dd2e0f503811ff428ab6b1d8ba62436e920
Signed-off-by: Srinivasa Rao Kuppala <srkupp@codeaurora.org>
2017-01-16 01:23:35 -08:00
..
backing-dev.c arch: Mass conversion of smp_mb__*() 2014-08-15 11:45:28 -07:00
balloon_compaction.c
bootmem.c
bounce.c
cleancache.c
compaction.c mm/compaction: fix wrong order check in compact_finished() 2015-03-18 13:22:28 +01:00
debug-pagealloc.c mm: Mark free pages as read only 2014-04-18 14:51:25 -07:00
dmapool.c
early_ioremap.c mm: create generic early_ioremap() support 2014-08-15 11:45:23 -07:00
fadvise.c
failslab.c
filemap_xip.c
filemap.c Page cache miss tracing using ftrace on mm/filemap 2016-05-10 13:14:58 +05:30
fremap.c
frontswap.c mm: frontswap: invalidate expired data on a dup-store failure 2014-12-16 09:09:41 -08:00
highmem.c
huge_memory.c mm: numa: Do not mark PTEs pte_numa when splitting huge pages 2014-10-09 12:18:42 -07:00
hugetlb_cgroup.c
hugetlb.c mm/hugetlb: add migration entry check in __unmap_hugepage_range 2015-03-18 13:22:27 +01:00
hwpoison-inject.c
init-mm.c
internal.h Merge "mm/page_alloc: restrict max order of merging on isolated pageblock Current pageblock isolation logic could isolate each pageblock individually. This causes freepage accounting problem if freepage with pageblock order on isolate pageblock is merged with other freepage on normal pageblock. We can prevent merging by restricting max order of merging to pageblock order if freepage is on isolate pageblock." 2014-12-18 14:23:16 -08:00
interval_tree.c
Kconfig BACKPORT: mm/zsmalloc: add statistics support 2016-05-10 13:15:32 +05:30
Kconfig.debug defconfig: 8994: enable CONFIG_DEBUG_SLUB_PANIC_ON 2014-10-21 14:00:18 -07:00
kmemcheck.c
kmemleak-test.c
kmemleak.c kmemleak : Make kmemleak_stack_scan optional using config 2015-02-04 18:38:40 +05:30
ksm.c This is the 3.10.84 stable release 2015-08-13 14:38:09 -07:00
maccess.c
madvise.c mm: add a field to store names for private anonymous memory 2014-06-13 12:05:14 -07:00
Makefile mm: vmpressure: allow in-kernel clients to subscribe for events 2016-05-24 05:37:46 -07:00
memblock.c mm/memblock: add memblock_get_current_limit 2014-04-08 09:51:10 -07:00
memcontrol.c UPSTREAM: memcg: Only free spare array when readers are done 2016-05-10 13:15:48 +05:30
memory_hotplug.c This is the 3.10.84 stable release 2015-08-13 14:38:09 -07:00
memory-failure.c mm/memory-failure: call shake_page() when error hits thp tail page 2015-05-17 09:51:32 -07:00
memory.c mm: avoid setting up anonymous pages into file mapping 2017-01-16 01:23:35 -08:00
mempolicy.c Merge upstream tag 'v3.10.49' into msm-3.10 2014-08-20 13:23:09 -07:00
mempool.c
migrate.c Merge upstream linux-stable v3.10.28 into msm-3.10 2014-03-24 14:28:34 -07:00
mincore.c
mlock.c mm: reorder can_do_mlock to fix audit denial 2015-08-12 18:30:46 -07:00
mm_init.c
mmap.c FROMLIST: mm: mmap: Add new /proc tunable for mmap_base ASLR. 2016-05-10 13:15:41 +05:30
mmu_context.c
mmu_notifier.c
mmzone.c
mprotect.c mm: add a field to store names for private anonymous memory 2014-06-13 12:05:14 -07:00
mremap.c mm, thp: close race between mremap() and split_huge_page() 2014-06-07 13:25:31 -07:00
msync.c
nobootmem.c mm/nobootmem.c: Drop __init annotation from free_bootmem_late 2014-04-21 15:28:38 -07:00
nommu.c This is the 3.10.84 stable release 2015-08-13 14:38:09 -07:00
oom_kill.c This is the 3.10.84 stable release 2015-08-13 14:38:09 -07:00
page_alloc.c This is the 3.10.84 stable release 2015-08-13 14:38:09 -07:00
page_cgroup.c cgroup/kmemleak: add kmemleak_free() for cgroup deallocations. 2014-11-14 08:47:59 -08:00
page_io.c
page_isolation.c mm/page_alloc: Call kernel_map_pages in unset_migrateype_isolate 2015-04-09 09:12:28 -07:00
page-writeback.c This is the 3.10.84 stable release 2015-08-13 14:38:09 -07:00
pageowner.c debugging: keep track of page owners 2014-03-28 13:33:08 -07:00
pagewalk.c mm: pagewalk: call pte_hole() for VM_PFNMAP during walk_page_range 2015-02-11 14:48:16 +08:00
percpu-km.c
percpu-vm.c percpu: perform tlb flush after pcpu_map_pages() failure 2014-10-05 14:54:13 -07:00
percpu.c Revert "percpu: free percpu allocation info for uniprocessor system" 2014-11-14 08:47:53 -08:00
pgtable-generic.c
process_vm_access.c
quicklist.c
readahead.c
rmap.c mm: rmap: fix use-after-free in __put_anon_vma 2014-07-30 18:41:12 +05:30
shmem.c This is the 3.10.84 stable release 2015-08-13 14:38:09 -07:00
showmem.c mm: Add notifier framework for showing memory 2014-10-06 09:47:49 -07:00
slab_common.c slab_common: fix the check for duplicate slab names 2014-07-31 12:53:50 -07:00
slab.c
slab.h
slob.c
slub.c mm/slub: don't wait for high-order page allocation 2016-01-13 21:45:19 -08:00
sparse-vmemmap.c
sparse.c
swap_state.c mm: swap: don't delay swap free for fast swap devices 2015-11-02 02:02:48 -08:00
swap.c mm: close PageTail race 2014-04-03 12:01:05 -07:00
swapfile.c BACKPORT: mm: /proc/pid/smaps:: show proportional swap share of the mapping 2016-05-10 13:15:39 +05:30
truncate.c mm: Remove false WARN_ON from pagecache_isize_extended() 2014-11-14 08:48:00 -08:00
util.c This is the 3.10.84 stable release 2015-08-13 14:38:09 -07:00
vmalloc.c bludgeon the flounder kernel until it builds on i386 for qemu testing 2015-08-12 18:31:24 -07:00
vmpressure.c mm: vmpressure: account allocstalls only on higher pressures. 2016-05-24 05:39:06 -07:00
vmscan.c mm: swap: don't delay swap free for fast swap devices 2015-11-02 02:02:48 -08:00
vmstat.c Revert "mm: add cma pcp list" 2014-08-22 11:03:00 -07:00
zbud.c
zpool.c BACKPORT: mm/zpool: add name argument to create zpool 2016-05-10 13:15:31 +05:30
zsmalloc.c UPSTREAM: zsmalloc: fix a null pointer dereference in destroy_handle_cache() 2016-05-10 13:15:38 +05:30
zswap.c mm, zswap: Fix CPU hotplug callback registration 2014-07-03 09:55:28 -07:00