Commit 1264a7a9 authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

restore: fail restore if pgid or sid are not restored

Don't fail if a root non-init task has another sid, because
it's inherited from parent and can't be restored and
it's expected behaviour, when a subtree is dumped.
Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 325ff7b4
......@@ -756,7 +756,7 @@ err:
static void xid_fail(void)
{
/* exit(1) */
exit(1);
}
static void restore_sid(void)
......@@ -782,6 +782,9 @@ static void restore_sid(void)
} else {
sid = getsid(getppid());
if (sid != me->sid) {
/* Skip the root task if it's not init */
if (me == root_item && root_item->pid.virt != 1)
return;
pr_err("Requested sid %d doesn't match inherited %d\n",
me->sid, sid);
xid_fail();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment