Commit 73e3925b authored by Pavel Emelyanov's avatar Pavel Emelyanov

pstree_item: Keep has_seccomp field on rst_info tail

Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 24f0f498
......@@ -1055,7 +1055,7 @@ static inline int fork_with_pid(struct pstree_item *item)
item->state = ca.core->tc->task_state;
rsti(item)->cg_set = ca.core->tc->cg_set;
item->has_seccomp = ca.core->tc->seccomp_mode != SECCOMP_MODE_DISABLED;
rsti(item)->has_seccomp = ca.core->tc->seccomp_mode != SECCOMP_MODE_DISABLED;
if (item->state == TASK_DEAD)
rsti(item->parent)->nr_zombies++;
......@@ -1686,7 +1686,7 @@ static void finalize_restore(int status)
* doing an munmap in the process, which may be blocked by
* seccomp and cause the task to be killed.
*/
if (item->has_seccomp && suspend_seccomp(pid) < 0)
if (rsti(item)->has_seccomp && suspend_seccomp(pid) < 0)
pr_err("failed to suspend seccomp, restore will probably fail...\n");
ctl = parasite_prep_ctl(pid, NULL);
......
......@@ -24,12 +24,6 @@ struct pstree_item {
int state; /* TASK_XXX constants */
/*
* On restore, we set this flag when process has seccomp filters so
* that we know to suspend them before we unmap the restorer blob.
*/
bool has_seccomp;
int nr_threads; /* number of threads */
struct pid *threads; /* array of threads */
CoreEntry **core;
......
......@@ -58,6 +58,13 @@ struct rst_info {
bool has_umask;
u32 umask;
/*
* We set this flag when process has seccomp filters
* so that we know to suspend them before we unmap the
* restorer blob.
*/
bool has_seccomp;
void *breakpoint;
};
......
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