From nobody Wed Nov 18 10:24:41 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jTyQK6Hygz71J6D for ; Wed, 18 Nov 2026 10:24:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jTyQK1xK0z4fYL for ; Wed, 18 Nov 2026 10:24:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794997481; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iWCqV0ys42yTJYmsqthhET8Vw/1pu2cNjX22TEuSuxU=; b=aFA8frRmW4ZiFTIOcscfjzQHRm2SoxHyWAE2JGwXIrOwWVdWy6ii0rgL2Y1cVm/1hgI1/I o3GBoZPe8uxWNr6z91nT9miSOdD/8RU6Qa6lQ3tMN6++dWzAZZYPrUfQifwlaQ6siC0IaB nQW+J6k1ViRPT2UW1fw37lNcSjn8jkd1iqluZ4LQPzCF+TrVnQZZnYn5An6z6X6rXhUBa1 Z21/pTopOusstBDjsoDCL7WVW9ZYYmpv05MlocjeD5ORO8o84fQqlulXDWXFoSQ0RqJ0G2 alFIb3YICk8FSs/4xsP6X/R2VJAc4WEqHXw1sTruuX0QbPxAW3BR7JLvYocvEQ== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1794997481; b=MQgQMjIxGTeHa+pMDNYEhn2G8lDX5dh6nwFIDDOrKLA6iwLyelcKti1l5R0VyDo6iIiLKF nHUXWcjvhebhilapwFCo5DizX0u9JsFk0L42rrYI8E/0+GxBVz6SQ9NhyuSyx7ok9MqkvD ZB6FvZFsCu8RpIBEJQza7/MkqGWMhs+Yp9ODPdWotcvHPqJPiS0OK6tYBMeYgx4m6ia09i HfYfOnprGmENrZvSQOXDsEbyC+lcM88KZYtOldF7P3ohr4aS9w4BcK2RYkttqjdnzeROzI IITxXmfoShXlWZ3jPEjmMxs61H/CdVlxvm4X+upV6BwPwyDq4uyZdQnRQDxMkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794997481; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iWCqV0ys42yTJYmsqthhET8Vw/1pu2cNjX22TEuSuxU=; b=fInxYTcO5HgjiV8hHUg96ShmHo5QcDFrA93AF0aSVgnJ17bBg+XotOezZF0ePPO7Om3Xa2 nKeHxHQhFdZJwKH7To/l/u8PfLao3SUkmctNiDXrF44VpQTEj2TswQEL51aIxueWCBDGE3 wzzhaR0veHXyxN/hqMtVRUmfxkZqpwQZEOP2jfPSgczuKdkOGW8EyugR2Pfdv1W7HYcXa6 X3VLmijvO4OKe7PbJjx7Go5Rjj+Qvq4qx3c9+tezap91FiVvXNxYr75e9J3ogIpmjbMWT2 5nlHl0Q7ST/H9xdas5/Qrwts3dAv9g0L0sRrPziUkETaZD+icN4iLWT3pRW4iA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jTyQK0lnKz1PDK for ; Wed, 18 Nov 2026 10:24:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 6270 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 18 Nov 2026 10:24:41 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: d5b70b1192ef - main - sound: Busy the device in SNDCTL_DSP_GETCAPS List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org List-Id: Commit messages for all branches of the src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d5b70b1192ef342c1314c1d5ff3335e13b5894a0 Auto-Submitted: auto-generated Date: Wed, 18 Nov 2026 10:24:41 +0000 Message-Id: <6afd7ce9.6270.1a76a27e@gitrepo.freebsd.org> The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=d5b70b1192ef342c1314c1d5ff3335e13b5894a0 commit d5b70b1192ef342c1314c1d5ff3335e13b5894a0 Author: Christos Margiolis AuthorDate: 2026-11-18 10:20:55 +0000 Commit: Christos Margiolis CommitDate: 2026-11-18 10:20:55 +0000 sound: Busy the device in SNDCTL_DSP_GETCAPS The handler read the device flags under PCM_LOCK, but those flags are written while holding the device busy, so busy it instead. The CHN_F_VIRTUAL checks do not need a lock. The flag is set once in vchan_init() when the channel is created and never cleared. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D60514 --- sys/dev/sound/pcm/dsp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c index 8fb1df6d5dd1..d1e9c1f7bc89 100644 --- a/sys/dev/sound/pcm/dsp.c +++ b/sys/dev/sound/pcm/dsp.c @@ -1354,7 +1354,7 @@ dsp_ioctl(struct cdev *i_dev, unsigned long cmd, caddr_t arg, int mode, break; case SNDCTL_DSP_GETCAPS: - PCM_LOCK(d); + PCM_ACQUIRE(d); *arg_i = PCM_CAP_REALTIME | PCM_CAP_MMAP | PCM_CAP_TRIGGER; if (rdch && wrch && !(pcm_getflags(d->dev) & SD_F_SIMPLEX)) *arg_i |= PCM_CAP_DUPLEX; @@ -1362,7 +1362,7 @@ dsp_ioctl(struct cdev *i_dev, unsigned long cmd, caddr_t arg, int mode, *arg_i |= PCM_CAP_VIRTUAL; if (wrch && (wrch->flags & CHN_F_VIRTUAL) != 0) *arg_i |= PCM_CAP_VIRTUAL; - PCM_UNLOCK(d); + PCM_RELEASE(d); break; case SOUND_PCM_READ_BITS: