[CRIU] [PATCH] sysctl: don't stop on a non-existent sysctl (v2)
Andrew Vagin
avagin at virtuozzo.com
Tue Dec 8 03:18:56 PST 2015
On Tue, Dec 08, 2015 at 11:48:10AM +0300, Andrey Vagin wrote:
> From: Andrey Vagin <avagin at openvz.org>
>
> We need to increment req, if we met a non-existent sysctl
>
> v2: typo fix
Andrey Ryabinin already sent the same patch.
The second patch from this series is still valid.
>
> Reported-by: Mr Jenkins
> Signed-off-by: Andrey Vagin <avagin at openvz.org>
> ---
> sysctl.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/sysctl.c b/sysctl.c
> index fb9293b..819ad7c 100644
> --- a/sysctl.c
> +++ b/sysctl.c
> @@ -362,8 +362,10 @@ static int __nonuserns_sysctl_op(struct sysctl_req *req, size_t nr_req, int op)
>
> fd = openat(dir, req->name, flags);
> if (fd < 0) {
> - if (errno == ENOENT && (req->flags & CTL_FLAGS_OPTIONAL))
> + if (errno == ENOENT && (req->flags & CTL_FLAGS_OPTIONAL)) {
> + req++;
> continue;
> + }
> pr_perror("Can't open sysctl %s", req->name);
> goto out;
> }
> --
> 2.4.3
>
More information about the CRIU
mailing list