diff options
author | anton <anton@openbsd.org> | 2020-09-25 09:43:01 +0000 |
---|---|---|
committer | anton <anton@openbsd.org> | 2020-09-25 09:43:01 +0000 |
commit | 77b41c921da0dab9eb95ca3f63beb33dfee5a6b3 (patch) | |
tree | 8d60de12d0d922c108bf8ff68cc41bd41b4e6b8c /sys/dev/kcov.c | |
parent | test-tls13-finished.py has 70 failing tests that expect a "decode_error" (diff) | |
download | wireguard-openbsd-77b41c921da0dab9eb95ca3f63beb33dfee5a6b3.tar.xz wireguard-openbsd-77b41c921da0dab9eb95ca3f63beb33dfee5a6b3.zip |
Remove work around kcov_remote_leave() that no longer is needed since
the introduction of the remote barrier in revision 1.26.
Diffstat (limited to 'sys/dev/kcov.c')
-rw-r--r-- | sys/dev/kcov.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/sys/dev/kcov.c b/sys/dev/kcov.c index 2e795b80323..7ff36d29464 100644 --- a/sys/dev/kcov.c +++ b/sys/dev/kcov.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kcov.c,v 1.28 2020/08/30 13:19:44 anton Exp $ */ +/* $OpenBSD: kcov.c,v 1.29 2020/09/25 09:43:01 anton Exp $ */ /* * Copyright (c) 2018 Anton Lindqvist <anton@openbsd.org> @@ -592,15 +592,12 @@ kcov_remote_leave(int subsystem, void *id) return; mtx_enter(&kcov_mtx); + if (curproc->p_kd == NULL) + goto out; kr = kr_lookup(subsystem, id); - /* - * The remote could have been absent when the same thread called - * kcov_remote_enter() earlier, allowing the remote to be registered - * while thread was inside the remote section. Therefore ensure we don't - * give back a reference we didn't acquire. - */ - if (kr == NULL || curproc->p_kd == NULL || curproc->p_kd != kr->kr_kd) + if (kr == NULL) goto out; + KASSERT(curproc->p_kd == kr->kr_kd); curproc->p_kd = NULL; if (--kr->kr_nsections == 0) wakeup(kr); |