Re: [PATCH] ipmr: Don't mark ip6mr_rtnl_msg_handlers as __initconst
From: Arnd Bergmann
Date: Fri Oct 18 2024 - 15:10:13 EST
On Fri, Oct 18, 2024, at 16:31, Kuniyuki Iwashima wrote:
> From: Arnd Bergmann <arnd@xxxxxxxxxx>
> Date: Fri, 18 Oct 2024 15:12:14 +0000
>> From: Arnd Bergmann <arnd@xxxxxxxx>
>>
>> This gets referenced by the ip6_mr_cleanup function, so it must not be
>> discarded early:
>>
>> WARNING: modpost: vmlinux: section mismatch in reference: ip6_mr_cleanup+0x14 (section: .exit.text) -> ip6mr_rtnl_msg_handlers (section: .init.rodata)
>> ERROR: modpost: Section mismatches detected.
>> Set CONFIG_SECTION_MISMATCH_WARN_ONLY=y to allow them.
>>
>> Fixes: 3ac84e31b33e ("ipmr: Use rtnl_register_many().")
>> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
>
> Hi,
>
> I posted this yesterday.
> https://lore.kernel.org/netdev/20241017174732.39487-1-kuniyu@xxxxxxxxxx/
Right, your may be better then. I was confused by the
function name suggesting that this would be called in the
module_exit path, but I now see that it is only called
at init time, so that works.
Arnd