[CRIU] [PATCH 2/5] net: Don't zap error code in check mode

Cyrill Gorcunov gorcunov at openvz.org
Tue Mar 26 06:39:22 EDT 2013


On Tue, Mar 26, 2013 at 02:29:32PM +0400, Andrew Vagin wrote:
> On Tue, Mar 26, 2013 at 01:26:37AM +0400, Cyrill Gorcunov wrote:
> > In check mode we need error code returned if
> > one of diag kernel module is not loaded or
> > not built at all. Thus if no netns mask passed
> > return error code so caller may check if something
> > were wrong.
> > 
> > Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> > ---
> >  sockets.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/sockets.c b/sockets.c
> > index b854eb4..55db4bc 100644
> > --- a/sockets.c
> > +++ b/sockets.c
> > @@ -525,7 +525,8 @@ out:
> >  		 * if an unsupported socket will be really dumped.
> >  		 */
> >  		pr_info("Uncollected sockets! Will probably fail later.\n");
> > -		err = 0;
> > +		if (current_ns_mask & CLONE_NEWNET)
> 
> Do you read the previous comment? This path is only for
> !(current_ns_mask & CLONE_NEWNET).

current_ns_mask = 0 for check mode.


More information about the CRIU mailing list