diff options
| author | Tejun Heo <tj@kernel.org> | 2016-09-06 12:35:56 -0400 |
|---|---|---|
| committer | Tejun Heo <tj@kernel.org> | 2016-09-06 12:35:56 -0400 |
| commit | 2536524a91fe5c5a9fddd282fd4e79ee0976aefe (patch) | |
| tree | 30eb5b4cd6d9ed4fda69526537d4fac454cbc5e6 /kernel/seccomp.c | |
| parent | 7d36dd00ab8d57134cce86ad4febc2f5bbdf3e72 (diff) | |
| parent | bc4dee5aa72723632a1f83fd0d3720066c93b433 (diff) | |
Merge branch 'master' into for-4.9
Diffstat (limited to 'kernel/seccomp.c')
| -rw-r--r-- | kernel/seccomp.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/kernel/seccomp.c b/kernel/seccomp.c index ef6c6c3f9d8a..0db7c8a2afe2 100644 --- a/kernel/seccomp.c +++ b/kernel/seccomp.c @@ -605,12 +605,16 @@ static int __seccomp_filter(int this_syscall, const struct seccomp_data *sd, ptrace_event(PTRACE_EVENT_SECCOMP, data); /* * The delivery of a fatal signal during event - * notification may silently skip tracer notification. - * Terminating the task now avoids executing a system - * call that may not be intended. + * notification may silently skip tracer notification, + * which could leave us with a potentially unmodified + * syscall that the tracer would have liked to have + * changed. Since the process is about to die, we just + * force the syscall to be skipped and let the signal + * kill the process and correctly handle any tracer exit + * notifications. */ if (fatal_signal_pending(current)) - do_exit(SIGSYS); + goto skip; /* Check if the tracer forced the syscall to be skipped. */ this_syscall = syscall_get_nr(current, task_pt_regs(current)); if (this_syscall < 0) |
