Commit 16923109 authored by Andrew Vagin's avatar Andrew Vagin Committed by Pavel Emelyanov

ptrace: don't stop a process if it was not in the stopped state (v2)

v2: fix one more place
Reported-by: 's avatarPavel Emelyanov <xemul@parallels.com>
Cc: Tycho Andersen <tycho.andersen@canonical.com>
Acked-by: 's avatarTycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: 's avatarAndrew Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent a973e6fc
...@@ -181,17 +181,17 @@ try_again: ...@@ -181,17 +181,17 @@ try_again:
if (*creds == NULL) { if (*creds == NULL) {
*creds = xzalloc(sizeof(struct proc_status_creds)); *creds = xzalloc(sizeof(struct proc_status_creds));
if (!*creds) if (!*creds)
goto err_stop; goto err;
**creds = cr; **creds = cr;
} else if (!proc_status_creds_eq(*creds, &cr)) { } else if (!proc_status_creds_eq(*creds, &cr)) {
pr_err("creds don't match %d %d\n", pid, ppid); pr_err("creds don't match %d %d\n", pid, ppid);
goto err_stop; goto err;
} }
if (cr.seccomp_mode != SECCOMP_MODE_DISABLED && suspend_seccomp(pid) < 0) if (cr.seccomp_mode != SECCOMP_MODE_DISABLED && suspend_seccomp(pid) < 0)
goto err_stop; goto err;
if (si.si_signo == SIGTRAP) if (si.si_signo == SIGTRAP)
return TASK_ALIVE; return TASK_ALIVE;
......
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