Re: [PATCH 2/2] IPVS: make failure of netns init more stable

To: Julian Anastasov <ja@xxxxxx>
Subject: Re: [PATCH 2/2] IPVS: make failure of netns init more stable
Cc: "horms@xxxxxxxxxxxx" <horms@xxxxxxxxxxxx>, "wensong@xxxxxxxxxxxx" <wensong@xxxxxxxxxxxx>, "lvs-devel@xxxxxxxxxxxxxxx" <lvs-devel@xxxxxxxxxxxxxxx>, "netdev@xxxxxxxxxxxxxxx" <netdev@xxxxxxxxxxxxxxx>, "netfilter-devel@xxxxxxxxxxxxxxx" <netfilter-devel@xxxxxxxxxxxxxxx>, "hans@xxxxxxxxxxxxxxx" <hans@xxxxxxxxxxxxxxx>
From: Hans Schillstrom <hans.schillstrom@xxxxxxxxxxxx>
Date: Tue, 17 Apr 2012 13:15:10 +0200
Hello Julian
On Monday 16 April 2012 16:25:23 Julian Anastasov wrote:
>       Hello,
>       Note that net_generic() and net->ipvs can not be
> used after ops_exit/ops_free and failed ops_init.

I wonder if we are chasing ghosts...

With proper fault handling I can't even see a case when it (net->ipvs) can be 
Can you see a case when it could happen?
Still we can set it to NULL on error exit and cleanup as you suggested, that 
doesn't harm I think.

A. If you add a netns and it fails the entire ns will be rolled back, 
   and no access to that ns can occur.
   That ns does not exist

B. If you insert ip_vs.ko when having one or more name spaces and 
   __ip_vs_init() returns an error the module will be unloaded.
   All ready loaded ns will not be affected.

C. insmod of ex. ip_vs_ftp only affects loaded name spaces
   and if the load of ip_vs_ftp fails it will be unloaded without affecting 
   (If ip_vs.ko is not loaded then it has to be loaded first case B...)

With a "compiled in" ip_vs case B doesn't exist.

With proper fault handling i.e. all ways returning fault codes to the netns 
there is no need for checking for  "if (!net->ipvs)" or any other action.

Hans Schillstrom <hans.schillstrom@xxxxxxxxxxxx>
To unsubscribe from this list: send the line "unsubscribe lvs-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at

<Prev in Thread] Current Thread [Next in Thread>