mirror of https://gitee.com/openkylin/linux.git
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security
Pull seccomp fix from James Morris: "A fix for a regression in the seccomp code (it was supposed to be in the first pull req but I had it queued in the wrong branch)" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: seccomp: Only dump core when single-threaded
This commit is contained in:
commit
b4642c109f
|
@ -643,11 +643,14 @@ static int __seccomp_filter(int this_syscall, const struct seccomp_data *sd,
|
||||||
default: {
|
default: {
|
||||||
siginfo_t info;
|
siginfo_t info;
|
||||||
audit_seccomp(this_syscall, SIGSYS, action);
|
audit_seccomp(this_syscall, SIGSYS, action);
|
||||||
/* Show the original registers in the dump. */
|
/* Dump core only if this is the last remaining thread. */
|
||||||
syscall_rollback(current, task_pt_regs(current));
|
if (get_nr_threads(current) == 1) {
|
||||||
/* Trigger a manual coredump since do_exit skips it. */
|
/* Show the original registers in the dump. */
|
||||||
seccomp_init_siginfo(&info, this_syscall, data);
|
syscall_rollback(current, task_pt_regs(current));
|
||||||
do_coredump(&info);
|
/* Trigger a manual coredump since do_exit skips it. */
|
||||||
|
seccomp_init_siginfo(&info, this_syscall, data);
|
||||||
|
do_coredump(&info);
|
||||||
|
}
|
||||||
do_exit(SIGSYS);
|
do_exit(SIGSYS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue