From 12c033ca34131c2d20dae66d7789342383abcd83 Mon Sep 17 00:00:00 2001 From: David Ahern Date: Tue, 9 Apr 2019 04:48:39 +0000 Subject: [PATCH] net/ipv4: Fix missing raw_init when CONFIG_PROC_FS is disabled mainline inclusion from mainline-v5.0 commit 86d1d8b72caf category: bugfix bugzilla: 9289 CVE: NA ------------------------------------------------- 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") Reported-by: Randy Dunlap Cc: Mike Manning Signed-off-by: David Ahern Signed-off-by: David S. Miller Signed-off-by: Lin Miaohe Reviewed-by: Keefe LIU Signed-off-by: Yang Yingliang --- net/ipv4/raw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c index 75200d7f50f6..2dd2055403de 100644 --- a/net/ipv4/raw.c +++ b/net/ipv4/raw.c @@ -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 */ -- GitLab