diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2020-09-13 09:48:40 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2020-09-13 09:48:40 +0000 |
commit | 59645d857c0e01b4e13701defcb9212d346dbc56 (patch) | |
tree | 2c02cb0a356dfe3a2ce1d81a055f5f6674a365f5 /sys | |
parent | 3e1a043e68357813ed98497c75a740cdf9515a69 (diff) |
Grep the KERNEL_LOCK in ktrpsig() before calling ktrwrite(). Another
little step towards moving signal delivery outside of KERNEL_LOCK.
OK mpi@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_ktrace.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/kern_ktrace.c b/sys/kern/kern_ktrace.c index 6bcb17c797b..3d5408eadc0 100644 --- a/sys/kern/kern_ktrace.c +++ b/sys/kern/kern_ktrace.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_ktrace.c,v 1.103 2020/04/03 03:20:12 visa Exp $ */ +/* $OpenBSD: kern_ktrace.c,v 1.104 2020/09/13 09:48:39 claudio Exp $ */ /* $NetBSD: kern_ktrace.c,v 1.23 1996/02/09 18:59:36 christos Exp $ */ /* @@ -291,7 +291,9 @@ ktrpsig(struct proc *p, int sig, sig_t action, int mask, int code, kp.code = code; kp.si = *si; + KERNEL_LOCK(); ktrwrite(p, &kth, &kp, sizeof(kp)); + KERNEL_UNLOCK(); atomic_clearbits_int(&p->p_flag, P_INKTR); } |