* [PATCH] ARM: module: Ensure the override of module_arch_freeing_init()
@ 2025-08-29 9:06 Petr Pavlu
2025-08-29 10:11 ` Russell King (Oracle)
0 siblings, 1 reply; 2+ messages in thread
From: Petr Pavlu @ 2025-08-29 9:06 UTC (permalink / raw)
To: Russell King; +Cc: linux-arm-kernel, linux-kernel, Petr Pavlu
The function module_arch_freeing_init() defined in arch/arm/kernel/module.c
is supposed to override a weak function of the same name defined in
kernel/module/main.c. However, the ARM override is also marked as weak,
which means that selecting the correct function unnecessarily depends on
the order in which object files with both functions are passed to the
linker. Although it happens to be correct at the moment, the proper pattern
is to make the ARM override a strong definition.
Fixes: cdcb07e45a91 ("ARM: 8975/1: module: fix handling of unwind init sections")
Signed-off-by: Petr Pavlu <petr.pavlu@suse.com>
---
arch/arm/kernel/module.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/kernel/module.c b/arch/arm/kernel/module.c
index da488d92e7a0..55ca3fcd37e8 100644
--- a/arch/arm/kernel/module.c
+++ b/arch/arm/kernel/module.c
@@ -484,7 +484,7 @@ module_arch_cleanup(struct module *mod)
#endif
}
-void __weak module_arch_freeing_init(struct module *mod)
+void module_arch_freeing_init(struct module *mod)
{
#ifdef CONFIG_ARM_UNWIND
struct unwind_table *init = mod->arch.init_table;
base-commit: 07d9df80082b8d1f37e05658371b087cb6738770
--
2.51.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ARM: module: Ensure the override of module_arch_freeing_init()
2025-08-29 9:06 [PATCH] ARM: module: Ensure the override of module_arch_freeing_init() Petr Pavlu
@ 2025-08-29 10:11 ` Russell King (Oracle)
0 siblings, 0 replies; 2+ messages in thread
From: Russell King (Oracle) @ 2025-08-29 10:11 UTC (permalink / raw)
To: Petr Pavlu; +Cc: linux-arm-kernel, linux-kernel
On Fri, Aug 29, 2025 at 11:06:44AM +0200, Petr Pavlu wrote:
> The function module_arch_freeing_init() defined in arch/arm/kernel/module.c
> is supposed to override a weak function of the same name defined in
> kernel/module/main.c. However, the ARM override is also marked as weak,
> which means that selecting the correct function unnecessarily depends on
> the order in which object files with both functions are passed to the
> linker. Although it happens to be correct at the moment, the proper pattern
> is to make the ARM override a strong definition.
>
> Fixes: cdcb07e45a91 ("ARM: 8975/1: module: fix handling of unwind init sections")
> Signed-off-by: Petr Pavlu <petr.pavlu@suse.com>
LGTM, please ensure it ends up in the patch system (see signature
below). Thanks.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-08-29 10:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-29 9:06 [PATCH] ARM: module: Ensure the override of module_arch_freeing_init() Petr Pavlu
2025-08-29 10:11 ` Russell King (Oracle)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).