netfilter-devel.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 4/8] ipvs: reset ipvs pointer in netns
Date: Mon, 30 Apr 2012 17:16:51 +0200	[thread overview]
Message-ID: <1335799015-2003-5-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>

	Make sure net->ipvs is reset on netns cleanup or failed
initialization. It is needed for IPVS applications to know that
IPVS core is not loaded in netns.

Signed-off-by: Julian Anastasov <ja@ssi.bg>
Acked-by: Hans Schillstrom <hans.schillstrom@ericsson.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
---
 net/netfilter/ipvs/ip_vs_core.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/netfilter/ipvs/ip_vs_core.c b/net/netfilter/ipvs/ip_vs_core.c
index 2555816..260b9ef 100644
--- a/net/netfilter/ipvs/ip_vs_core.c
+++ b/net/netfilter/ipvs/ip_vs_core.c
@@ -1924,6 +1924,7 @@ protocol_fail:
 control_fail:
 	ip_vs_estimator_net_cleanup(net);
 estimator_fail:
+	net->ipvs = NULL;
 	return -ENOMEM;
 }
 
@@ -1936,6 +1937,7 @@ static void __net_exit __ip_vs_cleanup(struct net *net)
 	ip_vs_control_net_cleanup(net);
 	ip_vs_estimator_net_cleanup(net);
 	IP_VS_DBG(2, "ipvs netns %d released\n", net_ipvs(net)->gen);
+	net->ipvs = NULL;
 }
 
 static void __net_exit __ip_vs_dev_cleanup(struct net *net)
-- 
1.7.9.5


  parent reply	other threads:[~2012-04-30 15:17 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 ` [PATCH 2/8] ipvs: fix crash in ip_vs_control_net_cleanup on unload pablo
2012-04-30 15:16 ` [PATCH 3/8] ipvs: add check in ftp for initialized core pablo
2012-04-30 15:16 ` pablo [this message]
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-5-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).