From 6b79436eb29915a429d43a5075a0164c1574d896 Mon Sep 17 00:00:00 2001 From: claudio Date: Thu, 12 May 2022 16:29:58 +0000 Subject: [PATCH] During coredumps only a single thread should be active, check this by checking that it is a single threaded process or that ps_single is set. OK mpi@ --- sys/kern/exec_elf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/kern/exec_elf.c b/sys/kern/exec_elf.c index 567a252640b..da29b0fc37d 100644 --- a/sys/kern/exec_elf.c +++ b/sys/kern/exec_elf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exec_elf.c,v 1.165 2021/12/09 00:26:10 guenther Exp $ */ +/* $OpenBSD: exec_elf.c,v 1.166 2022/05/12 16:29:58 claudio Exp $ */ /* * Copyright (c) 1996 Per Fogelstrom @@ -1165,6 +1165,7 @@ coredump_notes_elf(struct proc *p, void *iocookie, size_t *sizep) size_t size, notesize; int error; + KASSERT(!P_HASSIBLING(p) || pr->ps_single != NULL); size = 0; /* First, write an elfcore_procinfo. */ -- 2.20.1