mm-percpu-use-kmemleak_ignore_phys-instead-of-kmemleak_free.patch removed from -mm tree
The quilt patch titled
Subject: mm: percpu: use kmemleak_ignore_phys() instead of kmemleak_free()
has been removed from the -mm tree. Its filename was
mm-percpu-use-kmemleak_ignore_phys-instead-of-kmemleak_free.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: Patrick Wang <[email protected]>
Subject: mm: percpu: use kmemleak_ignore_phys() instead of kmemleak_free()
Date: Tue, 5 Jul 2022 19:31:58 +0800
Kmemleak recently added a rbtree to store the objects allocted with physical address. Those objects can't be freed with kmemleak_free().
According to the comments, percpu allocations are tracked by kmemleak separately. Kmemleak_free() was used to avoid the unnecessary tracking. If kmemleak_free() fails, those objects would be scanned by kmemleak, which is unnecessary but shouldn't lead to other effects.
Use kmemleak_ignore_phys() instead of kmemleak_free() for those objects.
---
mm/percpu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
mm/percpu.c renamed from mm/percpu.c~mm-percpu-use-kmemleak_ignore_phys-instead-of-kmemleak_free +3 -3
@@ -3104,7 +3104,7 @@ int __init pcpu_embed_first_chunk(size_t goto out_free_areas; }/* kmemleak tracks the percpu allocations separately */ -kmemleak_free (ptr); +kmemleak_ignore_phys (__pa (ptr)); areas[group] = ptr; base =min (ptr, base);
@@ -3304,7 +3304,7 @@ int __init pcpu_page_first_chunk(size_t goto enomem; }/* kmemleak tracks the percpu allocations separately */ -kmemleak_free (ptr); +kmemleak_ignore_phys (__pa (ptr)); pages[j++] =virt_to_page (ptr); } }
@@ -3417,7 +3417,7 @@ void __init setup_per_cpu_areas(void)if (!ai || !fc)panic ("Failed to allocate memory for percpu areas." );/* kmemleak tracks the percpu allocations separately */ -kmemleak_free (fc); +kmemleak_ignore_phys (__pa (fc)); ai->dyn_size = unit_size; ai->unit_size = unit_size;
_
Patches currently in -mm which might be from [email protected] are