diff options
author | Kees Cook <keescook@chromium.org> | 2017-02-23 18:24:24 +0100 |
---|---|---|
committer | Kees Cook <keescook@chromium.org> | 2017-06-26 18:22:33 +0200 |
commit | 131b63515932d18a3b1a60db3958f3c0dd5462bc (patch) | |
tree | 6ff3432d849fae094639f1bce5b72a17d7f90a3d /kernel | |
parent | Linux 4.12-rc2 (diff) | |
download | linux-131b63515932d18a3b1a60db3958f3c0dd5462bc.tar.xz linux-131b63515932d18a3b1a60db3958f3c0dd5462bc.zip |
seccomp: Clean up core dump logic
This just cleans up the core dumping logic to avoid the braces around
the RET_KILL case.
Signed-off-by: Kees Cook <keescook@chromium.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/seccomp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/seccomp.c b/kernel/seccomp.c index 65f61077ad50..fce83885b7ef 100644 --- a/kernel/seccomp.c +++ b/kernel/seccomp.c @@ -641,11 +641,12 @@ static int __seccomp_filter(int this_syscall, const struct seccomp_data *sd, return 0; case SECCOMP_RET_KILL: - default: { - siginfo_t info; + default: audit_seccomp(this_syscall, SIGSYS, action); /* Dump core only if this is the last remaining thread. */ if (get_nr_threads(current) == 1) { + siginfo_t info; + /* Show the original registers in the dump. */ syscall_rollback(current, task_pt_regs(current)); /* Trigger a manual coredump since do_exit skips it. */ @@ -654,7 +655,6 @@ static int __seccomp_filter(int this_syscall, const struct seccomp_data *sd, } do_exit(SIGSYS); } - } unreachable(); |