Fixes for netns initializations
Subsystems (3)
Julian Anastasov
maintainerv2 cover Fixes for netns initializations
This changeset fixes problems with failed netns
initializations. Hans should provide similar fix for LBLC and LBLCR. This is for the stable tree.
Julian Anastasov (2):
ipvs: reset ipvs pointer in netns
ipvs: add check in ftp for initialized core
net/netfilter/ipvs/ip_vs_core.c | 2 ++ net/netfilter/ipvs/ip_vs_ftp.c | 2 ++ 2 files changed, 4 insertions(+), 0 deletions(-)
Signature · 1 line
1.7.3.4
Julian Anastasov
maintainerPATCH v2 1/2 ipvs: reset ipvs pointer in netns
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.
--- net/netfilter/ipvs/ip_vs_core.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
net/netfilter/ipvs/ip_vs_core.c +2 -0
@@ -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)
Signature · 1 line
1.7.3.4
Re: [PATCH v2 1/2] ipvs: reset ipvs pointer in netns
Hello
Quoted 5 lines · On Tuesday 24 April 2012 23:29:58 Julian Anastasov wrote:
Make sure net->ipvs is reset on netns cleanup or failedinitialization. It is needed for IPVS applications to know that IPVS core is not loaded in netns.
Signed-off-by Julian Anastasov <[email protected]>
Quoted 24 lines
--- net/netfilter/ipvs/ip_vs_core.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)net/netfilter/ipvs/ip_vs_core.c +2
-0@@ -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)
Signature · 2 lines
Regards Hans Schillstrom <[email protected]>
Julian Anastasov
maintainerPATCH v2 2/2 ipvs: add check in ftp for initialized core
In reply to Julian Anastasov Avoid crash when registering ip_vs_ftp after
the IPVS core initialization for netns fails. Do this by checking for present core (net->ipvs).
--- net/netfilter/ipvs/ip_vs_ftp.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
net/netfilter/ipvs/ip_vs_ftp.c +2 -0
@@ -439,6 +439,8 @@ static int __net_init __ip_vs_ftp_init(struct net *net)struct ip_vs_app *app;struct netns_ipvs *ipvs =net_ipvs (net); +if (!ipvs) +return -ENOENT ; app =kmemdup (&ip_vs_ftp,sizeof (struct ip_vs_app ),GFP_KERNEL );if (!app)return -ENOMEM ;
Signature · 1 line
1.7.3.4
Re: [PATCH v2 2/2] ipvs: add check in ftp for initialized core
Quoted 5 lines · On Tuesday 24 April 2012 23:29:59 Julian Anastasov wrote:
Avoid crash when registering
ip_vs_ftpafter
the IPVS core initialization for netns fails. Do this by checking for present core (net->ipvs).Signed-off-by Julian Anastasov <[email protected]>
Quoted 17 lines
--- net/netfilter/ipvs/ip_vs_ftp.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)net/netfilter/ipvs/ip_vs_ftp.c +2
-0@@ -439,6 +439,8 @@ static int __net_init __ip_vs_ftp_init(struct net *net)struct ip_vs_app *app;struct netns_ipvs *ipvs =net_ipvs (net); +if (!ipvs) +return -ENOENT ; app =kmemdup (&ip_vs_ftp,sizeof (struct ip_vs_app ),GFP_KERNEL );if (!app)return -ENOMEM ;
Signature · 2 lines
Regards Hans Schillstrom <[email protected]>
Simon Horman
maintainerQuoted 11 lines · Julian Anastasov
This changeset fixes problems with failed netns
initializations. Hans should provide similar fix for LBLC and LBLCR. This is for the stable tree.Julian Anastasov (2):
ipvs: reset ipvs pointer in netns
ipvs: add check in ftp for initialized corenet/netfilter/ipvs/ip_vs_core.c | 2 ++ net/netfilter/ipvs/ip_vs_ftp.c | 2 ++ 2 files changed, 4 insertions(+), 0 deletions(-)
Thanks, both patches pushed to ipvs.
I plan to will wait for Hans's fixes to be finalised before sending a pull request.
Simon Horman
maintainerQuoted 9 lines · Simon Horman
Quoted 8 lines · Julian Anastasov
This changeset fixes problems with failed netns
initializations. Hans should provide similar fix for LBLC and LBLCR. This is for the stable tree.Julian Anastasov (2):
ipvs: reset ipvs pointer in netns
ipvs: add check in ftp for initialized core
Quoted 7 lines
Quoted 3 lines
net/netfilter/ipvs/ip_vs_core.c | 2 ++ net/netfilter/ipvs/ip_vs_ftp.c | 2 ++ 2 files changed, 4 insertions(+), 0 deletions(-)Thanks, both patches pushed to ipvs.
I plan to will wait for Hans's fixes to be finalised before sending a pull request.
Incidently, I have rebased the ipvs tree to include the latest merged patches in Pablo's net tree.