Skip to contentSkip to conversation

mm-kmemleak-mark-variables-as-__read_mostly.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message May 13, 2025

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: mm: kmemleak: mark variables as __read_mostly
has been removed from the -mm tree. Its filename was
mm-kmemleak-mark-variables-as-__read_mostly.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: Luiz Capitulino <[email protected]>
Subject: mm: kmemleak: mark variables as __read_mostly
Date: Wed, 30 Apr 2025 16:59:47 -0400

The variables kmemleak_enabled and kmemleak_free_enabled are read in the kmemleak alloc and free path respectively, but are only written to if/when kmemleak is disabled.

---

 mm/kmemleak.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
mm/kmemleak.c renamed from mm/kmemleak.c~mm-kmemleak-mark-variables-as-__read_mostly +2 -2
@@ -210,9 +210,9 @@ static struct kmem_cache *object_cache;
 static struct kmem_cache *scan_area_cache;
 
 /* set if tracing memory operations is enabled */
-static int kmemleak_enabled = 1;
+static int kmemleak_enabled __read_mostly = 1;
 /* same as above but only for the kmemleak_free() callback */
-static int kmemleak_free_enabled = 1;
+static int kmemleak_free_enabled __read_mostly = 1;
 /* set in the late_initcall if there were no errors */
 static int kmemleak_late_initialized;
 /* set if a fatal kmemleak error has occurred */

_

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