Skip to content

Commit

Permalink
seize: fix error handling for check_freezer_cgroup
Browse files Browse the repository at this point in the history
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 #2508

Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
  • Loading branch information
rst0git committed Nov 4, 2024
1 parent dcc3b49 commit ea03746
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions criu/seize.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ea03746

Please sign in to comment.