diff mbox

net/ipv6/netfilter: solve section mismatch in nf_conntrack_reasm

Message ID 508BAE26.6010104@yahoo.es
State Accepted
Headers show

Commit Message

Hein Tibosch Oct. 27, 2012, 9:49 a.m. UTC
From: Hein Tibosch <hein_tibosch@yahoo.es>
Subject: net/ipv6/netfilter: solve section mismatch in nf_conntrack_reasm

WARNING: net/ipv6/netfilter/nf_defrag_ipv6.o(.text+0xe0): Section mismatch in
reference from the function nf_ct_net_init() to the function
.init.text:nf_ct_frag6_sysctl_register()
The function nf_ct_net_init() references
the function __init nf_ct_frag6_sysctl_register().
etc

In case nf_conntrack_ipv6 is compiled as a module, nf_ct_net_init could be
called after the init code and data are unloaded.
Therefore remove the "__net_init" annotation from nf_ct_frag6_sysctl_register()

Signed-off-by: Hein Tibosch <hein_tibosch@yahoo.es>

---
 net/ipv6/netfilter/nf_conntrack_reasm.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Comments

Amerigo Wang Oct. 28, 2012, 12:49 p.m. UTC | #1
On Sat, 2012-10-27 at 17:49 +0800, Hein Tibosch wrote:
> From: Hein Tibosch <hein_tibosch@yahoo.es>
> Subject: net/ipv6/netfilter: solve section mismatch in nf_conntrack_reasm
> 
> WARNING: net/ipv6/netfilter/nf_defrag_ipv6.o(.text+0xe0): Section mismatch in
> reference from the function nf_ct_net_init() to the function
> .init.text:nf_ct_frag6_sysctl_register()
> The function nf_ct_net_init() references
> the function __init nf_ct_frag6_sysctl_register().
> etc
> 
> In case nf_conntrack_ipv6 is compiled as a module, nf_ct_net_init could be
> called after the init code and data are unloaded.
> Therefore remove the "__net_init" annotation from nf_ct_frag6_sysctl_register()
> 
> Signed-off-by: Hein Tibosch <hein_tibosch@yahoo.es>

Acked-by: Cong Wang <amwang@redhat.com>

Thanks!

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Pablo Neira Ayuso Oct. 28, 2012, 10:50 p.m. UTC | #2
On Sun, Oct 28, 2012 at 08:49:45PM +0800, Cong Wang wrote:
> On Sat, 2012-10-27 at 17:49 +0800, Hein Tibosch wrote:
> > From: Hein Tibosch <hein_tibosch@yahoo.es>
> > Subject: net/ipv6/netfilter: solve section mismatch in nf_conntrack_reasm
> > 
> > WARNING: net/ipv6/netfilter/nf_defrag_ipv6.o(.text+0xe0): Section mismatch in
> > reference from the function nf_ct_net_init() to the function
> > .init.text:nf_ct_frag6_sysctl_register()
> > The function nf_ct_net_init() references
> > the function __init nf_ct_frag6_sysctl_register().
> > etc
> > 
> > In case nf_conntrack_ipv6 is compiled as a module, nf_ct_net_init could be
> > called after the init code and data are unloaded.
> > Therefore remove the "__net_init" annotation from nf_ct_frag6_sysctl_register()
> > 
> > Signed-off-by: Hein Tibosch <hein_tibosch@yahoo.es>
> 
> Acked-by: Cong Wang <amwang@redhat.com>

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c b/net/ipv6/netfilter/nf_conntrack_reasm.c
index 18bd9bb..22c8ea9 100644
--- a/net/ipv6/netfilter/nf_conntrack_reasm.c
+++ b/net/ipv6/netfilter/nf_conntrack_reasm.c
@@ -85,7 +85,7 @@  static struct ctl_table nf_ct_frag6_sysctl_table[] = {
 	{ }
 };
 
-static int __net_init nf_ct_frag6_sysctl_register(struct net *net)
+static int nf_ct_frag6_sysctl_register(struct net *net)
 {
 	struct ctl_table *table;
 	struct ctl_table_header *hdr;
@@ -127,7 +127,7 @@  static void __net_exit nf_ct_frags6_sysctl_unregister(struct net *net)
 }
 
 #else
-static int __net_init nf_ct_frag6_sysctl_register(struct net *net)
+static int nf_ct_frag6_sysctl_register(struct net *net)
 {
 	return 0;
 }