Skip to contentSkip to conversation

ip6mr: Add __init to ip6_mr_cleanup().

PATCH Applied Kuniyuki Iwashima 3 participants 3 messages Oct 17, 2024 – Oct 23, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ip6mr: Add __init to ip6_mr_cleanup().

kernel test robot reported a section mismatch in ip6_mr_cleanup().

WARNING: modpost: vmlinux: section mismatch in reference: ip6_mr_cleanup+0x0 (section: .text) -> 0xffffffff (section: .init.rodata)
WARNING: modpost: vmlinux: section mismatch in reference: ip6_mr_cleanup+0x14 (section: .text) -> ip6mr_rtnl_msg_handlers (section: .init.rodata)

ip6_mr_cleanup() uses ip6mr_rtnl_msg_handlers[] that has __initconst_or_module qualifier.

ip6_mr_cleanup() is only called from inet6_init() but does not have __init qualifier.

Let's add __init to ip6_mr_cleanup().

---
 net/ipv6/ip6mr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv6/ip6mr.c +1 -1
index 437a9fdb67f5..8add0f45aa52 100644
@@ -1411,7 +1411,7 @@ int __init ip6_mr_init(void)
 	return err;
 }
 
-void ip6_mr_cleanup(void)
+void __init ip6_mr_cleanup(void)
 {
 	rtnl_unregister_many(ip6mr_rtnl_msg_handlers);
 #ifdef CONFIG_IPV6_PIMSM_V2
Signature · 1 line
2.39.5 (Apple Git-154)
Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · Kuniyuki Iwashima

kernel test robot reported a section mismatch in ip6_mr_cleanup().

WARNING: modpost: vmlinux: section mismatch in reference: ip6_mr_cleanup+0x0 (section: .text) -> 0xffffffff (section: .init.rodata)
WARNING: modpost: vmlinux: section mismatch in reference: ip6_mr_cleanup+0x14 (section: .text) -> ip6mr_rtnl_msg_handlers (section: .init.rodata)

ip6_mr_cleanup() uses ip6mr_rtnl_msg_handlers[] that has __initconst_or_module qualifier.

ip6_mr_cleanup() is only called from inet6_init() but does not have __init qualifier.

Quoted 7 lines

Let's add __init to ip6_mr_cleanup().

---

Quoted 16 lines
 net/ipv6/ip6mr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv6/ip6mr.c +1 -1
index 437a9fdb67f5..8add0f45aa52 100644
@@ -1411,7 +1411,7 @@ int __init ip6_mr_init(void)
 	return err;
 }
 
-void ip6_mr_cleanup(void)
+void __init ip6_mr_cleanup(void)
 {
 	rtnl_unregister_many(ip6mr_rtnl_msg_handlers);
 #ifdef CONFIG_IPV6_PIMSM_V2
#2 lore raw
In reply to Kuniyuki Iwashima
This patch was applied to netdev/net-next.git (main) by Paolo Abeni <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Paolo Abeni <[email protected]>:

Quoted 9 lines · On Thu, 17 Oct 2024 10:47:32 -0700 you wrote:

kernel test robot reported a section mismatch in ip6_mr_cleanup().

WARNING: modpost: vmlinux: section mismatch in reference: ip6_mr_cleanup+0x0 (section: .text) -> 0xffffffff (section: .init.rodata)
WARNING: modpost: vmlinux: section mismatch in reference: ip6_mr_cleanup+0x14 (section: .text) -> ip6mr_rtnl_msg_handlers (section: .init.rodata)

ip6_mr_cleanup() uses ip6mr_rtnl_msg_handlers[] that has __initconst_or_module qualifier.

[...]

Here is the summary with links:
- [v1,net-next] ip6mr: Add __init to ip6_mr_cleanup().

    https://git.kernel.org/netdev/net-next/c/7213a1c417d2

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html