Skip to contentSkip to conversation

net/handshake: Fix section mismatch in handshake_exit

PATCH Applied Geert Uytterhoeven 3 participants 3 messages Apr 20, 2023 – Apr 22, 2023

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

PATCH 1/1 net/handshake: Fix section mismatch in handshake_exit

If CONFIG_NET_NS=n (e.g. m68k/defconfig):

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

Fix this by dropping the __net_initdata tag from handshake_genl_net_ops.

Fixes 3b3009ea8abb713b ("net/handshake: Create a NETLINK service for handling handshake requests")
Reported-by [email protected]
---
 net/handshake/netlink.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/handshake/netlink.c +1 -1
index 8ea0ff993f9fba50..35c9c445e0b850d8 100644
@@ -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,
Signature · 1 line
2.34.1
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · Geert Uytterhoeven

If CONFIG_NET_NS=n (e.g. m68k/defconfig):

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

Fix this by dropping the __net_initdata tag from handshake_genl_net_ops.

Fixes 3b3009ea8abb713b ("net/handshake: Create a NETLINK service for handling handshake requests")
Reported-by [email protected]
Quoted 20 lines
---
 net/handshake/netlink.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/handshake/netlink.c +1 -1
index 8ea0ff993f9fba50..35c9c445e0b850d8 100644
@@ -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,
Signature · 1 line
2.34.1
#2 lore raw
In reply to Geert Uytterhoeven
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

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

Quoted 8 lines · On Thu, 20 Apr 2023 19:37:23 +0200 you wrote:

If CONFIG_NET_NS=n (e.g. m68k/defconfig):

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

Fix this by dropping the __net_initdata tag from handshake_genl_net_ops.

[...]

Here is the summary with links:
- net/handshake: Fix section mismatch in handshake_exit

    https://git.kernel.org/netdev/net-next/c/6aa445e39693

You are awesome, thank you!

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