Centos-kernel-stream-9/mm
Chris von Recklinghausen 8bc744b383 mm: mark the OOM reaper thread as freezable
Bugzilla: https://bugzilla.redhat.com/2120352

commit 3723929eb0f50e2101de739cdb66458a4f1f4b27
Author: Sultan Alsawaf <sultan@kerneltoast.com>
Date:   Fri Nov 5 13:43:25 2021 -0700

    mm: mark the OOM reaper thread as freezable

    The OOM reaper alters user address space which might theoretically alter
    the snapshot if reaping is allowed to happen after the freezer quiescent
    state.  To this end, the reaper kthread uses wait_event_freezable()
    while waiting for any work so that it cannot run while the system
    freezes.

    However, the current implementation doesn't respect the freezer because
    all kernel threads are created with the PF_NOFREEZE flag, so they are
    automatically excluded from freezing operations.  This means that the
    OOM reaper can race with system snapshotting if it has work to do while
    the system is being frozen.

    Fix this by adding a set_freezable() call which will clear the
    PF_NOFREEZE flag and thus make the OOM reaper visible to the freezer.

    Please note that the OOM reaper altering the snapshot this way is mostly
    a theoretical concern and has not been observed in practice.

    Link: https://lkml.kernel.org/r/20210921165758.6154-1-sultan@kerneltoast.com
    Link: https://lkml.kernel.org/r/20210918233920.9174-1-sultan@kerneltoast.com
    Fixes: aac4536355 ("mm, oom: introduce oom reaper")
    Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
    Acked-by: Michal Hocko <mhocko@suse.com>
    Cc: David Rientjes <rientjes@google.com>
    Cc: Mel Gorman <mgorman@suse.de>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Signed-off-by: Chris von Recklinghausen <crecklin@redhat.com>
2022-10-12 07:27:29 -04:00
..
damon treewide: Add missing includes masked by cgroup -> bpf dependency 2022-08-30 17:21:45 -04:00
kasan kasan: Extend KASAN mode kernel parameter 2022-10-12 07:27:25 -04:00
kfence Merge: Redhat: enable Kfence on production servers 2022-05-09 09:47:59 +02:00
Kconfig mm/mmap: add new config ARCH_HAS_VM_GET_PAGE_PROT 2022-10-12 07:27:18 -04:00
Kconfig.debug mm: page table check 2022-10-12 07:27:14 -04:00
Makefile mm: hugetlb_vmemmap: cleanup CONFIG_HUGETLB_PAGE_FREE_VMEMMAP* 2022-10-12 07:27:18 -04:00
backing-dev.c mm/vmscan: throttle reclaim until some writeback completes if congested 2022-10-12 07:27:29 -04:00
balloon_compaction.c
bootmem_info.c
cleancache.c
cma.c mm/cma: add cma_pages_valid to determine if pages are in CMA 2022-10-12 07:27:08 -04:00
cma.h
cma_debug.c
cma_sysfs.c
compaction.c mm/vmscan: centralise timeout values for reclaim_throttle 2022-10-12 07:27:29 -04:00
debug.c coredump: Limit coredumps to a single thread group 2022-10-12 07:27:25 -04:00
debug_page_ref.c
debug_vm_pgtable.c mm: debug_vm_pgtable: don't use __P000 directly 2022-10-12 07:27:26 -04:00
dmapool.c
early_ioremap.c
fadvise.c
failslab.c
filemap.c mm/vmscan: throttle reclaim until some writeback completes if congested 2022-10-12 07:27:29 -04:00
folio-compat.c mm/rmap: Convert rmap_walk() to take a folio 2022-07-10 10:44:19 -04:00
frontswap.c
gup.c Revert "mm: gup: gup_must_unshare()" 2022-10-12 07:27:01 -04:00
gup_test.c
gup_test.h
highmem.c
hmm.c
huge_memory.c mm/migration: add trace events for THP migrations 2022-10-12 07:27:17 -04:00
hugetlb.c hugetlb: remove redundant VM_BUG_ON() in add_reservation_in_range() 2022-10-12 07:27:28 -04:00
hugetlb_cgroup.c hugetlb_cgroup: remove unused hugetlb_cgroup_from_counter macro 2022-10-12 07:27:28 -04:00
hugetlb_vmemmap.c mm: hugetlb_vmemmap: cleanup CONFIG_HUGETLB_PAGE_FREE_VMEMMAP* 2022-10-12 07:27:18 -04:00
hugetlb_vmemmap.h mm: hugetlb_vmemmap: cleanup CONFIG_HUGETLB_PAGE_FREE_VMEMMAP* 2022-10-12 07:27:18 -04:00
hwpoison-inject.c
init-mm.c
internal.h mm/vmscan: centralise timeout values for reclaim_throttle 2022-10-12 07:27:29 -04:00
interval_tree.c
io-mapping.c
ioremap.c
khugepaged.c mm: khugepaged: recalculate min_free_kbytes after stopping khugepaged 2022-10-12 07:27:28 -04:00
kmemleak.c
ksm.c mm/ksm: remove old GCC 4.9+ check 2022-10-12 07:27:24 -04:00
list_lru.c
maccess.c
madvise.c mm: use pidfd_get_task() 2022-10-12 07:27:25 -04:00
mapping_dirty_helpers.c
memblock.c memblock: stop aliasing __memblock_free_late with memblock_free_late 2022-10-12 07:27:09 -04:00
memcontrol.c mm/vmscan: throttle reclaim when no progress is being made 2022-10-12 07:27:29 -04:00
memfd.c
memory-failure.c mm/memory_failure: constify static mm_walk_ops 2022-10-12 07:27:28 -04:00
memory.c mm/memory.c: avoid unnecessary kernel/user pointer conversion 2022-10-12 07:27:27 -04:00
memory_hotplug.c mm: hugetlb_vmemmap: cleanup hugetlb_free_vmemmap_enabled* 2022-10-12 07:27:18 -04:00
mempolicy.c mm/mempolicy: Use vma_alloc_folio() in new_page() 2022-07-10 10:44:22 -04:00
mempool.c
memremap.c mm: delete __ClearPageWaiters() 2022-07-10 10:44:21 -04:00
memtest.c
migrate.c mm: change page type prior to adding page table entry 2022-10-12 07:27:13 -04:00
mincore.c
mlock.c mm/munlock: protect the per-CPU pagevec by a local_lock_t 2022-07-21 14:50:55 -04:00
mm_init.c
mmap.c mm/mmap.c: fix a data race of mm->total_vm 2022-10-12 07:27:27 -04:00
mmap_lock.c
mmu_gather.c
mmu_notifier.c
mmzone.c mm/munlock: maintain page->mlock_count while unevictable 2022-07-10 10:44:12 -04:00
mprotect.c mm/mprotect.c: avoid repeated assignment in do_mprotect_pkey() 2022-10-12 07:27:27 -04:00
mremap.c mm, hugepages: add mremap() support for hugepage backed vma 2022-10-12 07:27:28 -04:00
msync.c
nommu.c
oom_kill.c mm: mark the OOM reaper thread as freezable 2022-10-12 07:27:29 -04:00
page-writeback.c mm/vmscan: centralise timeout values for reclaim_throttle 2022-10-12 07:27:29 -04:00
page_alloc.c mm/page_alloc: remove the throttling logic from the page allocator 2022-10-12 07:27:29 -04:00
page_counter.c
page_ext.c mm/page_ext.c: fix a comment 2022-10-12 07:27:26 -04:00
page_idle.c mm/rmap: Constify the rmap_walk_control argument 2022-07-10 10:44:19 -04:00
page_io.c mm: Convert swap_set_page_dirty() to swap_dirty_folio() 2022-07-10 10:44:14 -04:00
page_isolation.c mm/page_isolation: guard against possible putback unisolated page 2022-10-12 07:27:29 -04:00
page_owner.c Merge: mm: backport folio support 2022-05-03 10:59:25 +02:00
page_poison.c
page_reporting.c
page_reporting.h
page_table_check.c mm/page_table_check: fix accessing unmapped ptep 2022-10-12 07:27:21 -04:00
page_vma_mapped.c mm/rmap: Fix handling of hugetlbfs pages in page_vma_mapped_walk 2022-07-10 10:44:22 -04:00
pagewalk.c
percpu-internal.h
percpu-km.c
percpu-stats.c
percpu-vm.c
percpu.c memblock: use memblock_free for freeing virtual pointers 2022-07-01 17:07:00 -06:00
pgalloc-track.h
pgtable-generic.c
process_vm_access.c
ptdump.c mm: sparsemem: use page table lock to protect kernel pmd operations 2022-10-12 07:27:16 -04:00
readahead.c filemap: Fix serialization adding transparent huge pages to page cache 2022-07-10 10:44:22 -04:00
rmap.c Revert "mm: thp: stabilize the THP mapcount in page_remove_anon_compound_rmap" 2022-10-12 07:27:01 -04:00
rodata_test.c
secretmem.c
shmem.c mm/smaps: use vma->vm_pgoff directly when counting partial swap 2022-10-12 07:27:26 -04:00
shuffle.c
shuffle.h
slab.c mm: Convert check_heap_object() to use struct slab 2022-07-10 10:44:09 -04:00
slab.h mm: Convert check_heap_object() to use struct slab 2022-07-10 10:44:09 -04:00
slab_common.c mm: Use struct slab in kmem_obj_info() 2022-07-10 10:44:09 -04:00
slob.c mm: Use struct slab in kmem_obj_info() 2022-07-10 10:44:09 -04:00
slub.c mm/slub: Convert __free_slab() to use struct slab 2022-07-10 10:44:10 -04:00
sparse-vmemmap.c mm: sparsemem: fix missing higher order allocation splitting 2022-10-12 07:27:22 -04:00
sparse.c memblock: use memblock_free for freeing virtual pointers 2022-07-01 17:07:00 -06:00
swap.c mm: optimise put_pages_list() 2022-10-12 07:27:27 -04:00
swap_cgroup.c
swap_slots.c treewide: Add missing includes masked by cgroup -> bpf dependency 2022-08-30 17:21:45 -04:00
swap_state.c Revert "mm: COW: restore full accuracy in page reuse" 2022-10-12 07:27:00 -04:00
swapfile.c mm: change page type prior to adding page table entry 2022-10-12 07:27:13 -04:00
truncate.c mm/truncate: Combine invalidate_mapping_pagevec() and __invalidate_mapping_pages() 2022-07-10 10:44:17 -04:00
usercopy.c mm: Convert check_heap_object() to use struct slab 2022-07-10 10:44:09 -04:00
userfaultfd.c mm: Fix CVE-2022-2590 by reverting "mm/shmem: unconditionally set pte dirty in mfill_atomic_install_pte" 2022-08-08 10:59:03 +02:00
util.c mm: Allow arch specific arch_randomize_brk() with CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT 2022-10-12 07:27:19 -04:00
vmacache.c
vmalloc.c mm: functions may simplify the use of return values 2022-10-12 07:27:20 -04:00
vmpressure.c mm/vmpressure: fix data-race with memcg->socket_pressure 2022-10-12 07:27:29 -04:00
vmscan.c mm/vmscan: delay waking of tasks throttled on NOPROGRESS 2022-10-12 07:27:29 -04:00
vmstat.c mm/vmscan: throttle reclaim until some writeback completes if congested 2022-10-12 07:27:29 -04:00
workingset.c mm/workingset: Convert workingset_eviction() to take a folio 2022-07-10 10:44:16 -04:00
z3fold.c
zbud.c
zpool.c
zsmalloc.c zsmalloc: replace get_cpu_var with local_lock 2022-05-18 13:39:20 -04:00
zswap.c