[CRIU] [PATCH] cg: Fix restoration of tasks into existing cgroups

Tycho Andersen tycho.andersen at canonical.com
Wed Aug 13 06:41:30 PDT 2014


On Wed, Aug 13, 2014 at 04:24:27PM +0400, Pavel Emelyanov wrote:
> When we omit the --manage-cgroups on dump the controllers section
> in cgroups image lacks the none-d entries (the name=systemd is the
> most typical).
> 
> If it happens, that init task lives in non-criu cgset (it can be
> so if we do --shell-job dump from another terminal and see criu
> and root task living in different user.slice systemd cgroups) then
> on restore the move_in_cgroup() would fail to lookup the required
> controller.
> 
> In order to fix this we should still call the collect_cgroups()
> on dump, so that it adds the none-d controllers into the list,
> but don't dump the dirs tree itself.
> 
> The patch looks ugly, but it just moves the current_controller
> evaluation from the middle of the loop upwards (and renames the
> char *opts variable not to conflict with global opts).
> 
> Signed-off-by: Pavel Emelyanov <xemul at parallels.com>

Acked-by: Tycho Andersen <tycho.andersen at canonical.com>


More information about the CRIU mailing list