mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] net/handshake: fix section mismatch error for handshake_genl_net_ops
@ 2023-04-21  8:24 Arnd Bergmann
  2023-04-21 13:25 ` Chuck Lever III
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2023-04-21  8:24 UTC (permalink / raw)
  To: Chuck Lever, David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
  Cc: Arnd Bergmann, kernel-tls-handshake, netdev, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

The new netlink interface causes a link-time warning about the use of
a discarded symbol:

WARNING: modpost: vmlinux.o: section mismatch in reference: handshake_exit (section: .exit.text) -> (unknown) (section: .init.data)
ERROR: modpost: Section mismatches detected.

There are other instances of pernet_operations that are marked as
__net_initdata as well, so I'm not sure what the lifetime rules are,
but it's clear that any discarded symbol cannot be referenced from an
exitcall, so remove that annotation here.

Fixes: 3b3009ea8abb ("net/handshake: Create a NETLINK service for handling handshake requests")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 net/handshake/netlink.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/handshake/netlink.c b/net/handshake/netlink.c
index 8ea0ff993f9f..35c9c445e0b8 100644
--- a/net/handshake/netlink.c
+++ b/net/handshake/netlink.c
@@ -249,7 +249,7 @@ static void __net_exit handshake_net_exit(struct net *net)
 	}
 }
 
-static struct pernet_operations __net_initdata handshake_genl_net_ops = {
+static struct pernet_operations handshake_genl_net_ops = {
 	.init		= handshake_net_init,
 	.exit		= handshake_net_exit,
 	.id		= &handshake_net_id,
-- 
2.39.2


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-04-21 13:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-21  8:24 [PATCH] net/handshake: fix section mismatch error for handshake_genl_net_ops Arnd Bergmann
2023-04-21 13:25 ` Chuck Lever III

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®