* [PATCH] ipv4 ping: Fix __init* attributes
@ 2019-03-30 0:46 Andi Kleen
2019-04-02 1:00 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Andi Kleen @ 2019-03-30 0:46 UTC (permalink / raw)
To: netdev; +Cc: Andi Kleen
From: Andi Kleen <ak@linux.intel.com>
ping_v4_net_ops references init functions, so needs to be __initdata.
ping_proc_exit is then referenced from __initdata, so also needs
to be __init.
Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
net/ipv4/ping.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c
index 7ccb5f87f70b..070e078612a0 100644
--- a/net/ipv4/ping.c
+++ b/net/ipv4/ping.c
@@ -1160,7 +1160,7 @@ static void __net_exit ping_v4_proc_exit_net(struct net *net)
remove_proc_entry("icmp", net->proc_net);
}
-static struct pernet_operations ping_v4_net_ops = {
+static __initdata struct pernet_operations ping_v4_net_ops = {
.init = ping_v4_proc_init_net,
.exit = ping_v4_proc_exit_net,
};
@@ -1170,7 +1170,7 @@ int __init ping_proc_init(void)
return register_pernet_subsys(&ping_v4_net_ops);
}
-void ping_proc_exit(void)
+void __init ping_proc_exit(void)
{
unregister_pernet_subsys(&ping_v4_net_ops);
}
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ipv4 ping: Fix __init* attributes
2019-03-30 0:46 [PATCH] ipv4 ping: Fix __init* attributes Andi Kleen
@ 2019-04-02 1:00 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-04-02 1:00 UTC (permalink / raw)
To: andi; +Cc: netdev, ak
From: Andi Kleen <andi@firstfloor.org>
Date: Fri, 29 Mar 2019 17:46:00 -0700
> From: Andi Kleen <ak@linux.intel.com>
>
> ping_v4_net_ops references init functions, so needs to be __initdata.
> ping_proc_exit is then referenced from __initdata, so also needs
> to be __init.
>
> Signed-off-by: Andi Kleen <ak@linux.intel.com>
How can you spin up new network namespaces properly if you mark
this thing __init?
What __init functions does it even reference? It just creates and
destroys procfs files.
This patch doesn't seem correct, I'm not applying it.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-04-02 1:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-30 0:46 [PATCH] ipv4 ping: Fix __init* attributes Andi Kleen
2019-04-02 1:00 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).