Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b4642c10 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
parents a27fcb0c d7276e32
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -643,11 +643,14 @@ static int __seccomp_filter(int this_syscall, const struct seccomp_data *sd,
	default: {
		siginfo_t info;
		audit_seccomp(this_syscall, SIGSYS, action);
		/* Dump core only if this is the last remaining thread. */
		if (get_nr_threads(current) == 1) {
			/* Show the original registers in the dump. */
			syscall_rollback(current, task_pt_regs(current));
			/* Trigger a manual coredump since do_exit skips it. */
			seccomp_init_siginfo(&info, this_syscall, data);
			do_coredump(&info);
		}
		do_exit(SIGSYS);
	}
	}