Skip to contentSkip to conversation

kho-test-clean-up-residual-memory-upon-test_kho-module-unload.patch removed from -mm tree

merged mm-nonmm-stable Andrew Morton 1 participant 1 message Jan 21

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: kho: test: clean up residual memory upon test_kho module unload
has been removed from the -mm tree. Its filename was
kho-test-clean-up-residual-memory-upon-test_kho-module-unload.patch

This patch was dropped because it was merged into the mm-nonmm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Long Wei <[email protected]>
Subject: kho: test: clean up residual memory upon test_kho module unload
Date: Wed, 7 Jan 2026 10:24:27 +0800

During the initialization phase, the test_kho module invokes the kho_preserve_folio function, which internally configures bitmaps within kho_mem_track and establishes chunk linked lists in KHO. Upon unloading the test_kho module, it is necessary to clean up these states.

---

 lib/test_kho.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
lib/test_kho.c renamed from lib/test_kho.c~kho-test-clean-up-residual-memory-upon-test_kho-module-unload +5 -1
@@ -340,11 +340,15 @@ module_init(kho_test_init);
 
 static void kho_test_cleanup(void)
 {
+	/* unpreserve and free the data stored in folios */
+	kho_test_unpreserve_data(&kho_test_state);
 	for (int i = 0; i < kho_test_state.nr_folios; i++)
 		folio_put(kho_test_state.folios[i]);
 
 	kvfree(kho_test_state.folios);
-	vfree(kho_test_state.folios_info);
+
+	/* Unpreserve and release the FDT folio */
+	kho_unpreserve_folio(kho_test_state.fdt);
 	folio_put(kho_test_state.fdt);
 }
 

_

Patches currently in -mm which might be from [email protected] are