The quilt patch titled Subject: mm: check all swaps belong to same swap_cgroup in swap_pte_batch() fix has been removed from the -mm tree. Its filename was mm-attempt-to-batch-free-swap-entries-for-zap_pte_range-fix-2.patch This patch was dropped because it was folded into mm-attempt-to-batch-free-swap-entries-for-zap_pte_range.patch ------------------------------------------------------ From: Hugh Dickins <hughd@xxxxxxxxxx> Subject: mm: check all swaps belong to same swap_cgroup in swap_pte_batch() fix Date: Sun, 25 Aug 2024 13:09:46 -0700 (PDT) mm-unstable swap_pte_batch() adds a new usage of lookup_swap_cgroup_id(), which crashes if CONFIG_MEMCG kernel booted with "cgroup_disable=memory": it now needs a mem_cgroup_disabled() check. Link: https://lkml.kernel.org/r/33f34a88-0130-5444-9b84-93198eeb50e7@xxxxxxxxxx Fixes: 92b50df44566 ("mm: check all swaps belong to same swap_cgroup in swap_pte_batch()") Signed-off-by: Hugh Dickins <hughd@xxxxxxxxxx> Acked-by: Barry Song <baohua@xxxxxxxxxx> Cc: Barry Song <v-songbaohua@xxxxxxxx> Cc: Chris Li <chrisl@xxxxxxxxxx> Cc: David Hildenbrand <david@xxxxxxxxxx> Cc: "Huang, Ying" <ying.huang@xxxxxxxxx> Cc: Kairui Song <kasong@xxxxxxxxxxx> Cc: Kalesh Singh <kaleshsingh@xxxxxxxxxx> Cc: Ryan Roberts <ryan.roberts@xxxxxxx> Cc: Yosry Ahmed <yosryahmed@xxxxxxxxxx> Cc: Barry Song <21cnbao@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/swap_cgroup.c | 2 ++ 1 file changed, 2 insertions(+) --- a/mm/swap_cgroup.c~mm-attempt-to-batch-free-swap-entries-for-zap_pte_range-fix-2 +++ a/mm/swap_cgroup.c @@ -161,6 +161,8 @@ unsigned short swap_cgroup_record(swp_en */ unsigned short lookup_swap_cgroup_id(swp_entry_t ent) { + if (mem_cgroup_disabled()) + return 0; return lookup_swap_cgroup(ent, NULL)->id; } _ Patches currently in -mm which might be from hughd@xxxxxxxxxx are mm-attempt-to-batch-free-swap-entries-for-zap_pte_range.patch mm-filemap-use-xa_get_order-to-get-the-swap-entry-order-fix.patch mm-shmem-split-large-entry-if-the-swapin-folio-is-not-large-fix.patch mm-shmem-support-large-folio-swap-out-fix.patch mm-restart-if-multiple-traversals-raced-fix.patch mm-shmem-fix-minor-off-by-one-in-shrinkable-calculation.patch mm-shmem-extend-shmem_unused_huge_shrink-to-all-sizes.patch