Commit 131b6351 authored by Kees Cook's avatar Kees Cook

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: default avatarKees Cook <keescook@chromium.org>
parent 08332893
...@@ -641,11 +641,12 @@ static int __seccomp_filter(int this_syscall, const struct seccomp_data *sd, ...@@ -641,11 +641,12 @@ static int __seccomp_filter(int this_syscall, const struct seccomp_data *sd,
return 0; return 0;
case SECCOMP_RET_KILL: case SECCOMP_RET_KILL:
default: { default:
siginfo_t info;
audit_seccomp(this_syscall, SIGSYS, action); audit_seccomp(this_syscall, SIGSYS, action);
/* Dump core only if this is the last remaining thread. */ /* Dump core only if this is the last remaining thread. */
if (get_nr_threads(current) == 1) { if (get_nr_threads(current) == 1) {
siginfo_t info;
/* Show the original registers in the dump. */ /* Show the original registers in the dump. */
syscall_rollback(current, task_pt_regs(current)); syscall_rollback(current, task_pt_regs(current));
/* Trigger a manual coredump since do_exit skips it. */ /* 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, ...@@ -654,7 +655,6 @@ static int __seccomp_filter(int this_syscall, const struct seccomp_data *sd,
} }
do_exit(SIGSYS); do_exit(SIGSYS);
} }
}
unreachable(); unreachable();
......
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