Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions criu/cr-restore.c
Original file line number Diff line number Diff line change
Expand Up @@ -1572,7 +1572,12 @@ static int __restore_task_with_children(void *_arg)
/* Wait prepare_userns */
if (restore_finish_ns_stage(CR_STATE_ROOT_TASK, CR_STATE_PREPARE_NAMESPACES) < 0)
goto err;
}

if (needs_prep_creds(current) && (prepare_userns_creds()))
goto err;

if (current->parent == NULL) {
/*
* Since we don't support nesting of cgroup namespaces, let's
* only set up the cgns (if it exists) in the init task.
Expand All @@ -1581,9 +1586,6 @@ static int __restore_task_with_children(void *_arg)
goto err;
}

if (needs_prep_creds(current) && (prepare_userns_creds()))
goto err;

/*
* Call this _before_ forking to optimize cgroups
* restore -- if all tasks live in one set of cgroups
Expand Down
Loading