kallsyms-prevent-module-removal-when-printing-module-name-and-buildid.patch removed from -mm tree
The quilt patch titled
Subject: kallsyms: prevent module removal when printing module name and buildid
has been removed from the -mm tree. Its filename was
kallsyms-prevent-module-removal-when-printing-module-name-and-buildid.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: Petr Mladek <[email protected]>
Subject: kallsyms: prevent module removal when printing module name and buildid
Date: Fri, 28 Nov 2025 14:59:20 +0100
kallsyms_lookup_buildid() copies the symbol name into the given buffer so that it can be safely read anytime later. But it just copies pointers to mod->name and mod->build_id which might get reused after the related struct module gets removed.
The lifetime of struct module is synchronized using RCU. Take the rcu read lock for the entire __sprint_symbol().
---
kernel/kallsyms.c | 3 +++ 1 file changed, 3 insertions(+)
kernel/kallsyms.c renamed from kernel/kallsyms.c~kallsyms-prevent-module-removal-when-printing-module-name-and-buildid +3 -0
@@ -474,6 +474,9 @@ static int __sprint_symbol(char *buffer,unsigned long offset, size;int len; +/* Prevent module removal until modname and modbuildid are printed */ +guard (rcu)(); + address += symbol_offset; len =kallsyms_lookup_buildid (address, &size, &offset, &modname, &buildid, buffer);
_
Patches currently in -mm which might be from [email protected] are