mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-22 09:58:09 +00:00
pstree_item: Keep has_seccomp field on rst_info tail
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
parent
24f0f49871
commit
73e3925bcd
@ -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;
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user