]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm: check all swaps belong to same swap_cgroup in swap_pte_batch()
authorBarry Song <v-songbaohua@oppo.com>
Thu, 15 Aug 2024 21:36:23 +0000 (09:36 +1200)
committerAndrew Morton <akpm@linux-foundation.org>
Sat, 17 Aug 2024 00:53:04 +0000 (17:53 -0700)
commit95e1c3b101531d6206032066c6314eea43886f61
treee1b5a542ea2fc3926caa62d36bd02c3e176e5160
parent506702ef3ab77bdf24b9bf616a60c8af54d4afb5
mm: check all swaps belong to same swap_cgroup in swap_pte_batch()

Right now, it is possible two folios are contiguous in swap slots but they
don't belong to one memcg.  In this case, even we return a large nr, we
can't really batch free all slots.

Link: https://lkml.kernel.org/r/20240815215308.55233-1-21cnbao@gmail.com
Signed-off-by: Barry Song <v-songbaohua@oppo.com>
Reported-by: Yosry Ahmed <yosryahmed@google.com>
Reported-by: Chris Li <chrisl@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/internal.h