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

Cyrill Gorcunov gorcunov at openvz.org
Mon Mar 25 17:26:37 EDT 2013


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)
+			err = 0;
 	}
 
 	return err;
-- 
1.8.1.4



More information about the CRIU mailing list