android_kernel_oneplus_msm8998/mm
Shiraz Hashim 2f879b6dcb mm/memblock: fix a race between search and remove
no-map-fixup feature for dma-removed reserve region does a
late memblock remove. This late removal is a slight
deviation from conventional memblock flow. That leads to a
race between pfn_valid->memblock_search, and
memblock_remove.

To fix this, use a read seqlock in memblock_search, which
would ensure minimum overhead in search path. And export
two APIs to let code doing late memblock remove apply
write seqlock. write seqlock would ensure that search
retries if the list is updated concurrently.

The two exported APIs which should be called before
and after modifying memblock regions, late in boot, are
   - memblock_region_resize_late_begin
   - memblock_region_resize_late_end

The code to alter memblock regions should be guarded by
these APIs.

CRs-fixed: 967728
Change-Id: I6a10c3e980002048aafeaf829a16119848c6a099
Signed-off-by: Shiraz Hashim <shashim@codeaurora.org>
2016-03-23 21:19:51 -07:00
..
kasan UBSAN: run-time undefined behavior sanity checker 2016-03-22 11:09:57 -07:00
backing-dev.c mm, vmstat: fix wrong WQ sleep when memory reclaim doesn't make any progress 2016-02-17 12:31:06 -08:00
balloon_compaction.c
bootmem.c mm: Remove __init annotations from free_bootmem_late 2016-03-22 11:03:23 -07:00
cleancache.c
cma.c mm: cma: add trace events for CMA alloc perf testing 2016-03-23 21:14:00 -07:00
cma.h
cma_debug.c
compaction.c mm: compaction: fix the page state calculation in too_many_isolated 2016-03-22 11:03:54 -07:00
debug-pagealloc.c mm: Mark free pages as read only 2016-03-22 11:03:20 -07:00
debug.c mm: make compound_head() robust 2015-11-06 17:50:42 -08:00
dmapool.c mm, page_alloc: distinguish between being unable to sleep, unwilling to sleep and avoiding waking kswapd 2015-11-06 17:50:42 -08:00
early_ioremap.c
fadvise.c
failslab.c mm, page_alloc: rename __GFP_WAIT to __GFP_RECLAIM 2015-11-06 17:50:42 -08:00
filemap.c mm, fs: introduce mapping_gfp_constraint() 2015-11-06 17:50:42 -08:00
frame_vector.c
frontswap.c
gup.c mm: introduce VM_LOCKONFAULT 2015-11-05 19:34:48 -08:00
highmem.c
huge_memory.c mm: loosen MADV_NOHUGEPAGE to enable Qemu postcopy on s390 2015-11-20 16:17:32 -08:00
hugetlb.c mm/hugetlb.c: fix resv map memory leak for placeholder entries 2015-12-12 10:15:34 -08:00
hugetlb_cgroup.c mm: make compound_head() robust 2015-11-06 17:50:42 -08:00
hwpoison-inject.c
init-mm.c
internal.h mm: use 'unsigned int' for page order 2015-11-06 17:50:42 -08:00
interval_tree.c
Kconfig mm: zcache: add core files 2016-03-23 21:15:13 -07:00
Kconfig.debug defconfig: 8994: enable CONFIG_DEBUG_SLUB_PANIC_ON 2016-03-22 11:03:31 -07:00
kmemcheck.c
kmemleak-test.c
kmemleak.c kmemleak : Make kmemleak_stack_scan optional using config 2016-03-22 11:03:47 -07:00
ksm.c KSM: Start KSM by default 2016-03-22 11:03:30 -07:00
list_lru.c
maccess.c
madvise.c mm: add a field to store names for private anonymous memory 2016-02-16 13:54:13 -08:00
Makefile mm: swap: swap ratio support 2016-03-23 21:19:04 -07:00
memblock.c mm/memblock: fix a race between search and remove 2016-03-23 21:19:51 -07:00
memcontrol.c memcg: only free spare array when readers are done 2016-02-25 12:01:22 -08:00
memory-failure.c mm: soft-offline: check return value in second __get_any_page() call 2016-02-25 12:01:21 -08:00
memory.c mm: memory: reduce fault_around_bytes 2016-03-23 21:16:02 -07:00
memory_hotplug.c mm/memory_hotplug.c: check for missing sections in test_pages_in_a_zone() 2015-12-29 17:45:49 -08:00
mempolicy.c mm: add a field to store names for private anonymous memory 2016-02-16 13:54:13 -08:00
mempool.c mm, page_alloc: distinguish between being unable to sleep, unwilling to sleep and avoiding waking kswapd 2015-11-06 17:50:42 -08:00
memtest.c
migrate.c mm: cma: add trace events for CMA alloc perf testing 2016-03-23 21:14:00 -07:00
mincore.c
mlock.c Merge remote-tracking branch 'lsk-44/linux-linaro-lsk-v4.4' into 44rc2 2016-03-23 20:51:00 -07:00
mm_init.c
mmap.c Merge remote-tracking branch 'lsk-44/linux-linaro-lsk-v4.4' into 44rc2 2016-03-23 20:51:00 -07:00
mmu_context.c
mmu_notifier.c
mmzone.c
mprotect.c mm: add a field to store names for private anonymous memory 2016-02-16 13:54:13 -08:00
mremap.c
msync.c
nobootmem.c mm: Remove __init annotations from free_bootmem_late 2016-03-22 11:03:23 -07:00
nommu.c
oom_kill.c mm, oom: make dump_tasks public 2016-03-22 11:03:30 -07:00
page-writeback.c mm: page-writeback: fix page state calculation in throttle_vm_writeout 2016-03-22 11:03:54 -07:00
page_alloc.c mm: switch KASan hook calling order in page alloc/free path 2016-03-22 11:03:46 -07:00
page_counter.c
page_ext.c
page_idle.c
page_io.c
page_isolation.c
page_owner.c
pagewalk.c
percpu-km.c
percpu-vm.c
percpu.c
pgtable-generic.c mm,thp: khugepaged: call pte flush at the time of collapse 2016-02-25 12:01:23 -08:00
process_vm_access.c ptrace: use fsuid, fsgid, effective creds for fs access checks 2016-02-25 12:01:16 -08:00
quicklist.c
readahead.c mm: change initial readahead window size calculation 2016-03-22 11:03:39 -07:00
rmap.c
shmem.c ashmem: Add shmem_set_file to mm/shmem.c 2016-01-11 09:48:49 +05:30
showmem.c mm: showmem: make the notifiers atomic 2016-03-22 11:03:55 -07:00
slab.c slab/slub: adjust kmem_cache_alloc_bulk API 2015-11-22 11:58:44 -08:00
slab.h slab/slub: adjust kmem_cache_alloc_bulk API 2015-11-22 11:58:44 -08:00
slab_common.c slab/slub: adjust kmem_cache_alloc_bulk API 2015-11-22 11:58:44 -08:00
slob.c slab/slub: adjust kmem_cache_alloc_bulk API 2015-11-22 11:58:44 -08:00
slub.c mm: slub: call kasan_alloc_pages before freeing pages in slub 2016-03-22 11:10:45 -07:00
sparse-vmemmap.c
sparse.c
swap.c mm: make compound_head() robust 2015-11-06 17:50:42 -08:00
swap_cgroup.c
swap_ratio.c mm: swap: swap ratio support 2016-03-23 21:19:04 -07:00
swap_state.c mm: swap: fix swapcache usage for fast swap devices 2016-03-23 21:13:01 -07:00
swapfile.c mm: swap: swap ratio support 2016-03-23 21:19:04 -07:00
truncate.c
userfaultfd.c
util.c
vmacache.c
vmalloc.c mm: Update is_vmalloc_addr to account for vmalloc savings 2016-03-22 11:03:59 -07:00
vmpressure.c mm: vmpressure: account allocstalls only on higher pressures 2016-03-22 11:03:53 -07:00
vmscan.c mm: swap: don't delay swap free for fast swap devices 2016-03-22 11:03:52 -07:00
vmstat.c vmstat: allocate vmstat_wq before it is used 2016-01-08 23:47:54 -08:00
workingset.c
zbud.c mm: zsmalloc: constify struct zs_pool name 2015-11-06 17:50:42 -08:00
zcache.c mm: zcache: fix use after free in zcache_store_page 2016-03-23 21:19:12 -07:00
zpool.c mm: zsmalloc: constify struct zs_pool name 2015-11-06 17:50:42 -08:00
zsmalloc.c zsmalloc: fix migrate_zspage-zs_free race condition 2016-02-17 12:31:06 -08:00
zswap.c mm/zswap: change incorrect strncmp use to strcmp 2015-12-18 14:25:40 -08:00