diff options
author | 2020-12-07 16:55:28 +0000 | |
---|---|---|
committer | 2020-12-07 16:55:28 +0000 | |
commit | b21c774f9611a2013048bb9dfc02468e6860dad1 (patch) | |
tree | 0edc08a4801a5acf3d04ac257d6e94fc91e554f5 /sys/kern/exec_elf.c | |
parent | Limit the URL embedded in .cer files to only consist out of isalnum or (diff) | |
download | wireguard-openbsd-b21c774f9611a2013048bb9dfc02468e6860dad1.tar.xz wireguard-openbsd-b21c774f9611a2013048bb9dfc02468e6860dad1.zip |
Convert the per-process thread list into a SMR_TAILQ.
Currently all iterations are done under KERNEL_LOCK() and therefor use
the *_LOCKED() variant.
From and ok claudio@
Diffstat (limited to 'sys/kern/exec_elf.c')
-rw-r--r-- | sys/kern/exec_elf.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/exec_elf.c b/sys/kern/exec_elf.c index 5e455208663..1dd14cb1b04 100644 --- a/sys/kern/exec_elf.c +++ b/sys/kern/exec_elf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exec_elf.c,v 1.155 2020/07/06 13:33:09 pirofti Exp $ */ +/* $OpenBSD: exec_elf.c,v 1.156 2020/12/07 16:55:28 mpi Exp $ */ /* * Copyright (c) 1996 Per Fogelstrom @@ -85,6 +85,7 @@ #include <sys/signalvar.h> #include <sys/stat.h> #include <sys/pledge.h> +#include <sys/smr.h> #include <sys/mman.h> @@ -1360,7 +1361,7 @@ coredump_notes_elf(struct proc *p, void *iocookie, size_t *sizep) * threads in the process have been stopped and the list can't * change. */ - TAILQ_FOREACH(q, &pr->ps_threads, p_thr_link) { + SMR_TAILQ_FOREACH_LOCKED(q, &pr->ps_threads, p_thr_link) { if (q == p) /* we've taken care of this thread */ continue; error = coredump_note_elf(q, iocookie, ¬esize); |