aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2017-02-23 12:24:24 -0500
committerKees Cook <keescook@chromium.org>2017-06-26 12:22:33 -0400
commit131b63515932d18a3b1a60db3958f3c0dd5462bc (patch)
tree6ff3432d849fae094639f1bce5b72a17d7f90a3d
parent08332893e37af6ae779367e78e444f8f9571511d (diff)
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>
-rw-r--r--kernel/seccomp.c6
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,
641 return 0; 641 return 0;
642 642
643 case SECCOMP_RET_KILL: 643 case SECCOMP_RET_KILL:
644 default: { 644 default:
645 siginfo_t info;
646 audit_seccomp(this_syscall, SIGSYS, action); 645 audit_seccomp(this_syscall, SIGSYS, action);
647 /* Dump core only if this is the last remaining thread. */ 646 /* Dump core only if this is the last remaining thread. */
648 if (get_nr_threads(current) == 1) { 647 if (get_nr_threads(current) == 1) {
648 siginfo_t info;
649
649 /* Show the original registers in the dump. */ 650 /* Show the original registers in the dump. */
650 syscall_rollback(current, task_pt_regs(current)); 651 syscall_rollback(current, task_pt_regs(current));
651 /* Trigger a manual coredump since do_exit skips it. */ 652 /* 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 } 655 }
655 do_exit(SIGSYS); 656 do_exit(SIGSYS);
656 } 657 }
657 }
658 658
659 unreachable(); 659 unreachable();
660 660