netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: pablo@netfilter.org
To: netfilter-devel@vger.kernel.org
Cc: davem@davemloft.net, netdev@vger.kernel.org
Subject: [PATCH 2/8] ipvs: fix crash in ip_vs_control_net_cleanup on unload
Date: Mon, 30 Apr 2012 17:16:49 +0200	[thread overview]
Message-ID: <1335799015-2003-3-git-send-email-pablo@netfilter.org> (raw)
In-Reply-To: <1335799015-2003-1-git-send-email-pablo@netfilter.org>

From: Julian Anastasov <ja@ssi.bg>

	commit 14e405461e664b777e2a5636e10b2ebf36a686ec (2.6.39)
("Add __ip_vs_control_{init,cleanup}_sysctl()")
introduced regression due to wrong __net_init for
__ip_vs_control_cleanup_sysctl. This leads to crash when
the ip_vs module is unloaded.

	Fix it by changing __net_init to __net_exit for
the function that is already renamed to ip_vs_control_net_cleanup_sysctl.

Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Hans Schillstrom <hans@schillstrom.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
 net/netfilter/ipvs/ip_vs_ctl.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c
index b3afe18..376d2b1 100644
--- a/net/netfilter/ipvs/ip_vs_ctl.c
+++ b/net/netfilter/ipvs/ip_vs_ctl.c
@@ -3680,7 +3680,7 @@ int __net_init ip_vs_control_net_init_sysctl(struct net *net)
 	return 0;
 }
 
-void __net_init ip_vs_control_net_cleanup_sysctl(struct net *net)
+void __net_exit ip_vs_control_net_cleanup_sysctl(struct net *net)
 {
 	struct netns_ipvs *ipvs = net_ipvs(net);
 
@@ -3692,7 +3692,7 @@ void __net_init ip_vs_control_net_cleanup_sysctl(struct net *net)
 #else
 
 int __net_init ip_vs_control_net_init_sysctl(struct net *net) { return 0; }
-void __net_init ip_vs_control_net_cleanup_sysctl(struct net *net) { }
+void __net_exit ip_vs_control_net_cleanup_sysctl(struct net *net) { }
 
 #endif
 
-- 
1.7.9.5


  parent reply	other threads:[~2012-04-30 15:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-30 15:16 [PATCH 0/8] netfilter updates for 3.4-rc5 pablo
2012-04-30 15:16 ` [PATCH 1/8] ipvs: Verify that IP_VS protocol has been registered pablo
2012-04-30 15:16 ` pablo [this message]
2012-04-30 15:16 ` [PATCH 3/8] ipvs: add check in ftp for initialized core pablo
2012-04-30 15:16 ` [PATCH 4/8] ipvs: reset ipvs pointer in netns pablo
2012-04-30 15:16 ` [PATCH 5/8] ipvs: null check of net->ipvs in lblc(r) shedulers pablo
2012-04-30 15:16 ` [PATCH 6/8] ipvs: take care of return value from protocol init_netns pablo
2012-04-30 15:16 ` [PATCH 7/8] ipvs: kernel oops - do_ip_vs_get_ctl pablo
2012-04-30 15:16 ` [PATCH 8/8] netfilter: xt_CT: fix wrong checking in the timeout assignment path pablo
2012-04-30 17:23 ` [PATCH 0/8] netfilter updates for 3.4-rc5 David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1335799015-2003-3-git-send-email-pablo@netfilter.org \
    --to=pablo@netfilter.org \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).