From ea037464bc01f29b6755bfa9ab59b28d2245bf44 Mon Sep 17 00:00:00 2001 From: Radostin Stoyanov Date: Mon, 4 Nov 2024 19:30:26 +0000 Subject: [PATCH] seize: fix error handling for check_freezer_cgroup When `check_freezer_cgroup()` has non-zero return value, `goto err` calls `return ret`. However, the value of `ret`` has been set to `0` in the lines above and CRIU does not handle the error properly. This problem is related to https://github.com/checkpoint-restore/criu/issues/2508 Signed-off-by: Radostin Stoyanov --- criu/seize.c | 1 + 1 file changed, 1 insertion(+) diff --git a/criu/seize.c b/criu/seize.c index edeb57cc8a..a21350075a 100644 --- a/criu/seize.c +++ b/criu/seize.c @@ -1026,6 +1026,7 @@ int collect_pstree(void) if (ret < 0 && ret != -ENOTSUP) { goto err; } + ret = -1; if (opts.freeze_cgroup && cgroup_version()) goto err;