aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristos Margiolis <christos@FreeBSD.org>2024-04-28 19:40:52 +0000
committerChristos Margiolis <christos@FreeBSD.org>2024-04-28 19:48:24 +0000
commitfa284525499d75955525839074bf5968d0923e6b (patch)
treeebb895862e146b1d1ac7c503182644100b4e748c
parent03614fcba25b9de99e69819bc4690f66a3d24438 (diff)
downloadsrc-fa284525499d75955525839074bf5968d0923e6b.tar.gz
src-fa284525499d75955525839074bf5968d0923e6b.zip
sound: Assert that we do not enter chn_sleep() with CHN_F_SLEEPING
Sponsored by: The FreeBSD Foundation MFC after: 1 day Reviewed by: markj, emaste Differential Revision: https://reviews.freebsd.org/D44959
-rw-r--r--sys/dev/sound/pcm/channel.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c
index cf9239839aca..1527d5ea3d2c 100644
--- a/sys/dev/sound/pcm/channel.c
+++ b/sys/dev/sound/pcm/channel.c
@@ -332,6 +332,8 @@ chn_sleep(struct pcm_channel *c, int timeout)
int ret;
CHN_LOCKASSERT(c);
+ KASSERT((c->flags & CHN_F_SLEEPING) == 0,
+ ("%s(): entered with CHN_F_SLEEPING", __func__));
if (c->flags & CHN_F_DEAD)
return (EINVAL);