mm-zswap-prevent-memory-cgroup-release-in-zswap_compress.patch removed from -mm tree
The quilt patch titled
Subject: mm: zswap: prevent memory cgroup release in zswap_compress()
has been removed from the -mm tree. Its filename was
mm-zswap-prevent-memory-cgroup-release-in-zswap_compress.patch
This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Qi Zheng <[email protected]>
Subject: mm: zswap: prevent memory cgroup release in zswap_compress()
Date: Thu, 5 Mar 2026 19:52:36 +0800
In the near future, a folio will no longer pin its corresponding memory cgroup. To ensure safety, it will only be appropriate to hold the rcu read lock or acquire a reference to the memory cgroup returned by folio_memcg(), thereby preventing it from being released.
In the current patch, the rcu read lock is employed to safeguard against the release of the memory cgroup in zswap_compress().
---
mm/zswap.c | 3 +++ 1 file changed, 3 insertions(+)
mm/zswap.c renamed from mm/zswap.c~mm-zswap-prevent-memory-cgroup-release-in-zswap_compress +3 -0
@@ -893,11 +893,14 @@ static bool zswap_compress(struct page ** to the active LRU list in the case. */ if (comp_ret || !dlen || dlen >=PAGE_SIZE ) { +rcu_read_lock ();if (!mem_cgroup_zswap_writeback_enabled (folio_memcg (page_folio (page)))) { +rcu_read_unlock (); comp_ret = comp_ret ? comp_ret : -EINVAL ; goto unlock; } +rcu_read_unlock (); comp_ret =0 ; dlen =PAGE_SIZE ; dst =kmap_local_page (page);
_
Patches currently in -mm which might be from [email protected] are