From: Simon Horman <horms@verge.net.au>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: lvs-devel@vger.kernel.org, netdev@vger.kernel.org,
netfilter-devel@vger.kernel.org,
Wensong Zhang <wensong@linux-vs.org>,
Julian Anastasov <ja@ssi.bg>,
Hans Schillstrom <hans.schillstrom@ericsson.com>,
Jesper Dangaard Brouer <brouer@redhat.com>,
Simon Horman <horms@verge.net.au>
Subject: [PATCH 2/5] ipvs: reset ipvs pointer in netns
Date: Fri, 27 Apr 2012 09:53:56 +0900 [thread overview]
Message-ID: <1335488039-13471-3-git-send-email-horms@verge.net.au> (raw)
In-Reply-To: <1335488039-13471-1-git-send-email-horms@verge.net.au>
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
next prev parent reply other threads:[~2012-04-27 0:53 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-27 0:53 [GIT PULL net] IPVS Simon Horman
2012-04-27 0:53 ` [PATCH 1/5] ipvs: add check in ftp for initialized core Simon Horman
2012-04-27 0:53 ` Simon Horman [this message]
2012-04-27 0:53 ` [PATCH 3/5] ipvs: null check of net->ipvs in lblc(r) shedulers Simon Horman
2012-04-29 23:43 ` Pablo Neira Ayuso
2012-04-30 6:35 ` Simon Horman
2012-04-27 0:53 ` [PATCH 4/5] ipvs: take care of return value from protocol init_netns Simon Horman
2012-04-27 0:53 ` [PATCH 5/5] ipvs: kernel oops - do_ip_vs_get_ctl Simon Horman
2012-04-30 9:27 ` [GIT PULL net] IPVS Pablo Neira Ayuso
2012-07-10 9:20 ` Simon Horman
2012-07-10 13:05 ` Pablo Neira Ayuso
2012-07-17 10:15 ` Pablo Neira Ayuso
2012-07-18 0:01 ` Simon Horman
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=1335488039-13471-3-git-send-email-horms@verge.net.au \
--to=horms@verge.net.au \
--cc=brouer@redhat.com \
--cc=hans.schillstrom@ericsson.com \
--cc=ja@ssi.bg \
--cc=lvs-devel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
--cc=wensong@linux-vs.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).