]> git.baikalelectronics.ru Git - kernel.git/commit
net: ipv6: unexport __init-annotated seg6_hmac_net_init()
authorYueHaibing <yuehaibing@huawei.com>
Tue, 28 Jun 2022 03:31:34 +0000 (11:31 +0800)
committerJakub Kicinski <kuba@kernel.org>
Wed, 29 Jun 2022 04:23:30 +0000 (21:23 -0700)
commitb039e333fed61dcdf56c2d1195e474c5493ee423
treed73f1c9c08425f984032af3f026f9a6b5d6e8ea5
parent9324a0fd35a101dd555301eb268b21ae118356e8
net: ipv6: unexport __init-annotated seg6_hmac_net_init()

As of commit f2ad1b88a727 ("net: ipv6: unexport __init-annotated seg6_hmac_init()"),
EXPORT_SYMBOL and __init is a bad combination because the .init.text
section is freed up after the initialization. Hence, modules cannot
use symbols annotated __init. The access to a freed symbol may end up
with kernel panic.

This remove the EXPORT_SYMBOL to fix modpost warning:

WARNING: modpost: vmlinux.o(___ksymtab+seg6_hmac_net_init+0x0): Section mismatch in reference from the variable __ksymtab_seg6_hmac_net_init to the function .init.text:seg6_hmac_net_init()
The symbol seg6_hmac_net_init is exported and annotated __init
Fix this by removing the __init annotation of seg6_hmac_net_init or drop the export.

Fixes: 2a102c0c3fb4 ("ipv6: sr: add core files for SR HMAC support")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20220628033134.21088-1-yuehaibing@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv6/seg6_hmac.c