public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Can no longer build ipv6 built-in (2.6.11, today's BK head)
@ 2005-03-16  2:55 Peter Chubb
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Chubb @ 2005-03-16  2:55 UTC (permalink / raw)
  To: linux-kernel, herbert, davidm



Changeset 
  herbert@gondor.apana.org.au|ChangeSet|20050310043957|06845
added cleanup to ipv6_init(), which calls ip6_route_cleanup()

ip6_route_cleanup() is marked __exit so cannot be called from an
__init section -- it's discarded by the linker from the image
(although it'll be retained in a module).

You get errors like this:
ip6_route_cleanup: discarded in section `.exit.text' from
net/built-in.o 
xfrm6_fini: discarded in section `.exit.text' from net/built-in.o
fib6_gc_cleanup: discarded in section `.exit.text' from net/built-in.o
ipv6_packet_cleanup: discarded in section `.exit.text' from
net/built-in.o


A simple fix is to delete the __exit from the various functions now that
they're called other than at module_exit.

Signed-off-by: Peter Chubb <peterc@gelato.unsw.edu.au>

Index: linux-2.5-import/net/ipv6/route.c
===================================================================
--- linux-2.5-import.orig/net/ipv6/route.c	2005-03-16 10:12:44.742595387 +1100
+++ linux-2.5-import/net/ipv6/route.c	2005-03-16 13:01:50.246678866 +1100
@@ -2116,7 +2116,7 @@
 #endif
 }
 
-void __exit ip6_route_cleanup(void)
+void ip6_route_cleanup(void)
 {
 #ifdef CONFIG_PROC_FS
 	proc_net_remove("ipv6_route");
Index: linux-2.5-import/net/ipv6/ipv6_sockglue.c
===================================================================
--- linux-2.5-import.orig/net/ipv6/ipv6_sockglue.c	2005-03-16 10:12:44.736736056 +1100
+++ linux-2.5-import/net/ipv6/ipv6_sockglue.c	2005-03-16 13:24:19.095793200 +1100
@@ -698,7 +698,7 @@
 	dev_add_pack(&ipv6_packet_type);
 }
 
-void __exit ipv6_packet_cleanup(void)
+void ipv6_packet_cleanup(void)
 {
 	dev_remove_pack(&ipv6_packet_type);
 }
Index: linux-2.5-import/net/ipv6/ip6_fib.c
===================================================================
--- linux-2.5-import.orig/net/ipv6/ip6_fib.c	2005-03-15 12:28:44.819748921 +1100
+++ linux-2.5-import/net/ipv6/ip6_fib.c	2005-03-16 13:27:46.423351526 +1100
@@ -1218,7 +1218,7 @@
 		panic("cannot create fib6_nodes cache");
 }
 
-void __exit fib6_gc_cleanup(void)
+void fib6_gc_cleanup(void)
 {
 	del_timer(&ip6_fib_timer);
 	kmem_cache_destroy(fib6_node_kmem);
Index: linux-2.5-import/net/ipv6/xfrm6_policy.c
===================================================================
--- linux-2.5-import.orig/net/ipv6/xfrm6_policy.c	2005-03-15 12:28:44.853928319 +1100
+++ linux-2.5-import/net/ipv6/xfrm6_policy.c	2005-03-16 13:53:28.890552848 +1100
@@ -276,7 +276,7 @@
 	xfrm_policy_register_afinfo(&xfrm6_policy_afinfo);
 }
 
-static void __exit xfrm6_policy_fini(void)
+static void xfrm6_policy_fini(void)
 {
 	xfrm_policy_unregister_afinfo(&xfrm6_policy_afinfo);
 }
@@ -287,7 +287,7 @@
 	xfrm6_state_init();
 }
 
-void __exit xfrm6_fini(void)
+void xfrm6_fini(void)
 {
 	//xfrm6_input_fini();
 	xfrm6_policy_fini();
Index: linux-2.5-import/net/ipv6/xfrm6_state.c
===================================================================
--- linux-2.5-import.orig/net/ipv6/xfrm6_state.c	2005-03-15 12:28:44.854904874 +1100
+++ linux-2.5-import/net/ipv6/xfrm6_state.c	2005-03-16 13:29:30.183337361 +1100
@@ -129,7 +129,7 @@
 	xfrm_state_register_afinfo(&xfrm6_state_afinfo);
 }
 
-void __exit xfrm6_state_fini(void)
+void xfrm6_state_fini(void)
 {
 	xfrm_state_unregister_afinfo(&xfrm6_state_afinfo);
 }



-- 
Dr Peter Chubb  http://www.gelato.unsw.edu.au  peterc AT gelato.unsw.edu.au
The technical we do immediately,  the political takes *forever*

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

end of thread, other threads:[~2005-03-16  9:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <200503160353.j2G3rTKr015647@mail02.syd.optusnet.com.au>
2005-03-16  4:06 ` Can no longer build ipv6 built-in (2.6.11, today's BK head) David S. Miller
2005-03-16  9:44   ` Herbert Xu
2005-03-16  2:55 Peter Chubb

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