[CRIU] [PATCH 1/2] sysctl: don't stop on a non-existent sysctl

Andrey Vagin avagin at gmail.com
Tue Dec 8 00:35:18 PST 2015


From: Andrey Vagin <avagin at openvz.org>

We need to increment req, if we met a non-existent sysctl

Reported-by: Mr Jenkins
Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
 sysctl.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sysctl.c b/sysctl.c
index f3ff175..9afbe03 100644
--- a/sysctl.c
+++ b/sysctl.c
@@ -362,6 +362,7 @@ static int __nonuserns_sysctl_op(struct sysctl_req *req, size_t nr_req, int op)
 
 		fd = openat(dir, req->name, flags);
 		if (fd < 0) {
+			req++;
 			if (errno == ENOENT && (req->flags & CTL_FLAGS_OPTIONAL))
 				continue;
 			pr_perror("Can't open sysctl %s", req->name);
-- 
2.4.3



More information about the CRIU mailing list