Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Apr 2024 10:43:47 GMT
From:      Christos Margiolis <christos@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 33e0f0cd6ba8 - stable/14 - sound: Assert that we do not enter chn_sleep() with CHN_F_SLEEPING
Message-ID:  <202404291043.43TAhlg3088494@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by christos:

URL: https://cgit.FreeBSD.org/src/commit/?id=33e0f0cd6ba8496f469d6616a0367d85025be523

commit 33e0f0cd6ba8496f469d6616a0367d85025be523
Author:     Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2024-04-28 19:40:52 +0000
Commit:     Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2024-04-29 10:43:31 +0000

    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
    
    (cherry picked from commit fa284525499d75955525839074bf5968d0923e6b)
---
 sys/dev/sound/pcm/channel.c | 2 ++
 1 file changed, 2 insertions(+)

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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202404291043.43TAhlg3088494>