An error occurred while fetching folder content.
mm, compaction: make sure we isolate a valid PFN
Suzuki K Poulose authored
When we have holes in a normal memory zone, we could endup having
cached_migrate_pfns which may not necessarily be valid, under heavy memory
pressure with swapping enabled ( via __reset_isolation_suitable(),
triggered by kswapd).

Later if we fail to find a page via fast_isolate_freepages(), we may end
up using the migrate_pfn we started the search with, as valid page.  This
could lead to accessing NULL pointer derefernces like below, due to an
invalid mem_section pointer.

Unable to handle kernel NULL pointer dereference at virtual address 0000000000000008 [47/1825]
 Mem abort info:
   ESR = 0x96000004
   Exception class = DABT (current EL), IL = 32 bits
   SET = 0, FnV = 0
   EA = 0, S1PTW = 0
 Data abort info:
   ISV = 0, ISS = 0x00000004
   CM = 0, WnR = 0
 user pgtable: 4k pages, 48-bit VAs, pgdp = 0000000082f94ae9
 [0000000000000008] pgd=0000000000000000
 Internal error: Oops: 96000004 [#1] SMP
 ...
 CPU: 10 PID: 6080 Comm: qemu-system-aar Not tainted...
e577c8b6
Name Last commit Last update
..
kasan kasan: initialize tag to 0xff in __kasan_kmalloc
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig
Kconfig.debug treewide: Add SPDX license identifier - Makefile/Kconfig
Makefile mm: shuffle initial free memory to improve memory-side-cache utilization
backing-dev.c treewide: Add SPDX license identifier for missed files
balloon_compaction.c treewide: Add SPDX license identifier for missed files
cleancache.c mm: use octal not symbolic permissions
cma.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 98
cma.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license
cma_debug.c mm/cma_debug.c: fix the break condition in cma_maxchunk_get()
compaction.c mm, compaction: make sure we isolate a valid PFN
debug.c mm: update references to page _refcount
debug_page_ref.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license
dmapool.c docs/core-api/mm: fix return value descriptions in mm/
early_ioremap.c mm/early_ioremap: Fix boot hang with earlyprintk=efi,keep
fadvise.c vfs: implement readahead(2) using POSIX_FADV_WILLNEED
failslab.c mm: no need to check return value of debugfs_create functions
filemap.c treewide: Add SPDX license identifier for missed files
frame_vector.c mm/frame_vector.c: release a semaphore in 'get_vaddr_frames()'
frontswap.c mm: use octal not symbolic permissions
gup.c mm/gup: continue VM_FAULT_RETRY processing even for pre-faults
gup_benchmark.c mm/gup: replace get_user_pages_longterm() with FOLL_LONGTERM
highmem.c mm: convert totalram_pages and totalhigh_pages variables to atomic
hmm.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157
huge_memory.c mm/huge_memory.c: make __thp_get_unmapped_area static
hugetlb.c
hugetlb_cgroup.c
hwpoison-inject.c
init-mm.c
internal.h
interval_tree.c
khugepaged.c
kmemleak-test.c
kmemleak.c
ksm.c
list_lru.c
maccess.c
madvise.c
memblock.c
memcontrol.c
memfd.c
memory-failure.c
memory.c
memory_hotplug.c
mempolicy.c
mempool.c
memtest.c
migrate.c
mincore.c
mlock.c
mm_init.c
mmap.c
mmu_context.c
mmu_gather.c
mmu_notifier.c
mmzone.c
mprotect.c
mremap.c
msync.c
nommu.c
oom_kill.c
page-writeback.c
page_alloc.c
page_counter.c
page_ext.c
page_idle.c
page_io.c
page_isolation.c
page_owner.c
page_poison.c
page_vma_mapped.c
pagewalk.c
percpu-internal.h
percpu-km.c
percpu-stats.c
percpu-vm.c
percpu.c
pgtable-generic.c
process_vm_access.c
quicklist.c
readahead.c
rmap.c
rodata_test.c
shmem.c
shuffle.c
shuffle.h
slab.c
slab.h
slab_common.c
slob.c
slub.c
sparse-vmemmap.c
sparse.c
swap.c
swap_cgroup.c
swap_slots.c
swap_state.c
swapfile.c
truncate.c
usercopy.c