Skip to contentSkip to conversation

net/ipv4: Fix missing raw_init when CONFIG_PROC_FS is disabled

PATCH Applied David Ahern 2 participants 2 messages Nov 28, 2018

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

PATCH 1/1 net/ipv4: Fix missing raw_init when CONFIG_PROC_FS is disabled

From: David Ahern <[email protected]>

Randy reported when CONFIG_PROC_FS is not enabled:
ld: net/ipv4/af_inet.o: in function `inet_init':
af_inet.c:(.init.text+0x42d): undefined reference to `raw_init'

Fix by moving the endif up to the end of the proc entries

Fixes 6897445fb194c ("net: provide a sysctl raw_l3mdev_accept for raw socket lookup with VRFs")
Cc Mike Manning <[email protected]>
---
 net/ipv4/raw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv4/raw.c +1 -1
index fb1f02015a15..076f51646d26 100644
@@ -1132,6 +1132,7 @@ void __init raw_proc_exit(void)
 {
 	unregister_pernet_subsys(&raw_net_ops);
 }
+#endif /* CONFIG_PROC_FS */
 
 static void raw_sysctl_init_net(struct net *net)
 {
@@ -1156,4 +1157,3 @@ void __init raw_init(void)
 	if (register_pernet_subsys(&raw_sysctl_ops))
 		panic("RAW: failed to init sysctl parameters.\n");
 }
-#endif /* CONFIG_PROC_FS */
Signature · 1 line
2.11.0
maintainer Applied
#1 lore raw

From: David Ahern <[email protected]>
Date: Tue, 27 Nov 2018 20:52:24 -0800

Quoted 6 lines

From: David Ahern <[email protected]>

Randy reported when CONFIG_PROC_FS is not enabled:
ld: net/ipv4/af_inet.o: in function `inet_init':
af_inet.c:(.init.text+0x42d): undefined reference to `raw_init'

Quoted 6 lines

Fix by moving the endif up to the end of the proc entries

Fixes 6897445fb194c ("net: provide a sysctl raw_l3mdev_accept for raw socket lookup with VRFs")
Cc Mike Manning <[email protected]>

Applied.