Commit 79bebdda authored by Kirill Tkhai's avatar Kirill Tkhai Committed by Andrei Vagin

sfds: Populate pid proc

This patch populates/occupies PROC_FD_OFF fd number,
which is goint to be replaced atomically in next patches.

v4: New
Signed-off-by: 's avatarKirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent f4cbf384
......@@ -400,6 +400,15 @@ static int populate_root_fd_off(void)
return ret >= 0 ? 0 : -1;
}
static int populate_pid_proc(void)
{
if (open_pid_proc(vpid(current)) < 0) {
pr_err("Can't open PROC_SELF\n");
return -1;
}
return 0;
}
static rt_sigaction_t sigchld_act;
/*
* If parent's sigaction has blocked SIGKILL (which is non-sence),
......@@ -1697,6 +1706,9 @@ static int restore_task_with_children(void *_arg)
timing_stop(TIME_FORK);
if (populate_pid_proc())
goto err;
if (unmap_guard_pages(current))
goto err;
......
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