Commit d5a3d807 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

seccomp: Don't lookup for pidns in restore_seccomp

Looking up for pid in nesting pidns supposed to be done
for non group leaders only, thus __export_restore_thread
do this check on its own and we don't have to make
a similar lookup especially on group leader where
pids in args never were valid.
Reported-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent 673d1c77
......@@ -431,17 +431,9 @@ static int restore_seccomp_filter(pid_t tid, struct thread_restore_args *args)
static int restore_seccomp(struct thread_restore_args *args)
{
pid_t tid;
pid_t tid = sys_gettid();
int ret;
tid = args->pid;
if (tid != sys_gettid()) {
pr_err("seccomp: Unexpected tid %d != %d\n",
tid, (pid_t)sys_gettid());
return -1;
}
switch (args->seccomp_mode) {
case SECCOMP_MODE_DISABLED:
pr_debug("seccomp: mode %d on tid %d\n", SECCOMP_MODE_DISABLED, tid);
......
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