Skip to content

mm: proactively backport MM fixes for RHEL-9.1

Rafael Aquini requested to merge raquini/centos-stream-9:bz2064990 into main

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2064990 Build and test information documanted in the BZ ticket.

Patches in this series are backport of follow up fixes for commits previously backported into RHEL, with their required dependencies and follow ups also backported. The intent is to proactively integrate fixes for known issues in order to keep code correctness and reduce the need for reactive debugging.

Rafael Aquini (55): mm: move kvmalloc-related functions to slab.h mm/slab.c: remove useless lines in enable_cpucache() slub: add back check for free nonslab objects mm, slub: change percpu partial accounting from objects to pages mm/slub: increase default cpu partial list sizes mm, slub: use prefetchw instead of prefetch mm: disable NUMA_BALANCING_DEFAULT_ENABLED and TRANSPARENT_HUGEPAGE on PREEMPT_RT mm: don't include <linux/dax.h> in <linux/mempolicy.h> kasan: fix tag for large allocations when using CONFIG_SLAB mm/filemap.c: remove bogus VM_BUG_ON mm/mremap: don't account pages in vma_to_resize() mm/vmalloc: repair warn_alloc()s in __vmalloc_area_node() mm/vmalloc: don't allow VM_NO_GUARD on vmap() mm/vmalloc: make show_numa_info() aware of hugepage mappings mm/vmalloc: make sure to dump unpurged areas in /proc/vmallocinfo mm/vmalloc: check various alignments when debugging vmalloc: back off when the current task is OOM-killed vmalloc: choose a better start address in vm_area_register_early() mm/vmalloc: be more explicit about supported gfp flags lib/test_vmalloc.c: use swap() to make code cleaner mm/large system hash: avoid possible NULL deref in alloc_large_system_hash mm/page_alloc.c: fix obsolete comment in free_pcppages_bulk() mm: move fold_vm_numa_events() to fix NUMA without SMP hugetlb: remove unnecessary set_page_count in prep_compound_gigantic_page mm/zsmalloc.c: close race window between zs_pool_dec_isolated() and zs_unregister_migration() hugetlb, userfaultfd: fix reservation restore on userfaultfd error mm/slub: fix endianness bug for alloc/free_traces attributes mm/memcg: relocate mod_objcg_mlstate(), get_obj_stock() and put_obj_stock() kfence: fix memory leak when cat kfence objects mm: mempolicy: fix THP allocations escaping mempolicy restrictions mm/slab_common: use WARN() if cache still has objects on destroy kasan: test: add globals left-out-of-bounds test kasan: add ability to detect double-kmem_cache_destroy() kasan: test: add test case for double-kmem_cache_destroy() kasan: fix quarantine conflicting with init_on_free Revert "mm/gup: small refactoring: simplify try_grab_page()" mm/debug_vm_pgtable: remove pte entry from the page table mm: don't try to NUMA-migrate COW pages that have other uses kasan: test: prevent cache merging in kmem_cache_double_destroy mm: Consider __GFP_NOWARN flag for oversized kvmalloc() calls mm/page_alloc: mark pagesets as __maybe_unused mm/pages_alloc.c: don't create ZONE_MOVABLE beyond the end of a node mm/page_alloc: fetch the correct pcp buddy during bulk free mm/page_alloc: track range of active PCP lists during bulk free mm/page_alloc: simplify how many pages are selected per pcp list during bulk free mm/page_alloc: drain the requested list first during bulk free mm/page_alloc: free pages in a single pass during bulk free mm/page_alloc: limit number of high-order pages on PCP during bulk free mm/page_alloc: do not prefetch buddies during bulk free mm/page_alloc: check high-order pages for corruption during PCP operations mm/hwpoison: fix error page recovered but reported "not recovered" mm/mlock: fix potential imbalanced rlimit ucounts adjustment mm/thp: refix __split_huge_pmd_locked() for migration PMD mm: madvise: return correct bytes advised with process_madvise mm/usercopy: return 1 from hardened_usercopy __setup() handler

drivers/hwmon/occ/p9_sbe.c | 1 + drivers/of/kexec.c | 1 + include/linux/mempolicy.h | 1 - include/linux/mm.h | 34 ------ include/linux/mm_types.h | 2 - include/linux/slab.h | 34 ++++++ include/linux/slub_def.h | 13 +-- include/linux/vmalloc.h | 2 +- init/Kconfig | 2 +- lib/test_kasan.c | 33 +++++- lib/test_vmalloc.c | 6 +- mm/Kconfig | 2 +- mm/debug_vm_pgtable.c | 2 + mm/filemap.c | 1 - mm/gup.c | 35 +++++- mm/huge_memory.c | 4 +- mm/hugetlb.c | 8 +- mm/kasan/common.c | 2 +- mm/kasan/quarantine.c | 11 ++ mm/kfence/core.c | 1 + mm/madvise.c | 3 +- mm/memcontrol.c | 106 +++++++++--------- mm/memory-failure.c | 5 +- mm/mempolicy.c | 3 +- mm/mlock.c | 1 + mm/mprotect.c | 2 +- mm/mremap.c | 50 ++++----- mm/page_alloc.c | 219 +++++++++++++++++-------------------- mm/slab.c | 3 - mm/slab_common.c | 13 +-- mm/slub.c | 110 ++++++++++++------- mm/usercopy.c | 5 +- mm/util.c | 4 +- mm/vmalloc.c | 64 +++++++---- mm/vmstat.c | 56 +++++----- mm/zsmalloc.c | 7 +- 36 files changed, 468 insertions(+), 378 deletions(-)

Signed-off-by: Rafael Aquini aquini@redhat.com

Edited by Rafael Aquini

Merge request reports