diff mbox series

[v1,net-next] ip6mr: Add __init to ip6_mr_cleanup().

Message ID 20241017174732.39487-1-kuniyu@amazon.com (mailing list archive)
State Accepted
Commit 7213a1c417d2c690de2c5aaa05b9dbec0d68a1b1
Delegated to: Netdev Maintainers
Headers show
Series [v1,net-next] ip6mr: Add __init to ip6_mr_cleanup(). | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 5 this patch: 5
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 6 of 6 maintainers
netdev/build_clang success Errors and warnings before: 3 this patch: 3
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 6 this patch: 6
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-10-19--00-00 (tests: 777)

Commit Message

Kuniyuki Iwashima Oct. 17, 2024, 5:47 p.m. UTC
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().

Fixes: 3ac84e31b33e ("ipmr: Use rtnl_register_many().")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202410180139.B3HeemsC-lkp@intel.com/
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
---
 net/ipv6/ip6mr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jacob Keller Oct. 17, 2024, 6:02 p.m. UTC | #1
On 10/17/2024 10:47 AM, Kuniyuki Iwashima 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.
> 
> ip6_mr_cleanup() is only called from inet6_init() but does
> not have __init qualifier.
> 
> Let's add __init to ip6_mr_cleanup().
> 
> Fixes: 3ac84e31b33e ("ipmr: Use rtnl_register_many().")
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202410180139.B3HeemsC-lkp@intel.com/
> Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
> ---

Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>

>  net/ipv6/ip6mr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c
> index 437a9fdb67f5..8add0f45aa52 100644
> --- a/net/ipv6/ip6mr.c
> +++ b/net/ipv6/ip6mr.c
> @@ -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
patchwork-bot+netdevbpf@kernel.org Oct. 23, 2024, 10:40 a.m. UTC | #2
Hello:

This patch was applied to netdev/net-next.git (main)
by Paolo Abeni <pabeni@redhat.com>:

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!
diff mbox series

Patch

diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c
index 437a9fdb67f5..8add0f45aa52 100644
--- a/net/ipv6/ip6mr.c
+++ b/net/ipv6/ip6mr.c
@@ -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