From nobody Tue Feb 25 11:48:10 2025 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 4Z2G7t4fnRz5pjfs; Tue, 25 Feb 2025 11:48:10 +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 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Z2G7t2bhwz3kBD; Tue, 25 Feb 2025 11:48:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1740484090; 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=KjLazXzMtYF9p7u911ChYKzTLktmpeC/Qx3JemQ5L94=; b=oLinL3FjzNfX+OWwvg225asxOMDPsHJr6aSrwrRLrTgGvw5TWit8ybVrKv1YUVq5qIQ801 2iqU6Yx1HIF1hpPyDy6CW0WRLzGaGquWj0glqcBZAxHV9p50KJL/RZ7eVM1Pv3sGNz4kPh TB8RHUJiUoMkNsWSk4HWGiUdBDwB7YMDG8QYd+pOh6zo1UO/nRlDqgdlpDvmICyaR0nHos yjDRpmdC8rrube8sXEKwN1eEN/cvHd1UuDABaUxcInHoBqS1wiP9rzZTxuDSxqadD7Iawm PnHFxNdNUd5yNvM/sUBjKStgREHesNcuBRxyc8svZmCEBnh3YkccVDjBuuiYdw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1740484090; a=rsa-sha256; cv=none; b=MuKj/L91INajmYXeP4oeWF7mnzLGnZqa49O+Ox6stH6TOwOshZjtJGB7Hj0mGIbwXHVz6r h3JipUDBceX37szXMaaIWWFZHkllArEiD+gyfeSsjOYGjiBhXEcL/m19zzH5RTBekojUjy mJIck+f55o78s4YrZlJpHLSSudFtILqb6McRCLBcKaLvgy0gOSMys1fstrnkO8LJJrSCH7 b0Zh+nNm6FwvaTOIeYh8mAXjw/YrN0F19w1bSjfNvx9HCaUrA4DRS7cWd+ouETSPtUCc5Y LNTWWdWbIrULaCV49suNDdUyIOFgI80Ai6RLvlRhaA5gpB2O4EE9Vx6RySKWnQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1740484090; 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=KjLazXzMtYF9p7u911ChYKzTLktmpeC/Qx3JemQ5L94=; b=K+ofEBiVRAM4NKDyIKjEanCVXQELDpM1J0PfwIO7BA7NLjKz0UyhlXO/3uPBJ83cWOJCq1 1NqRuumoK+if2iTxyE1tof4PIAmPLOC1dOGJ1SskVloRrX0hNVfFzhFK/tPyNQTgEfACnk Q4+AH81SYG3TJ7PF4x/X1g2f4y4E6cHraa8ZlQj9z780OQslIONOzrVogzPAMLo80weP0a uVVrvv9/fBiUkqXxfIvTSChLGFm9Ba5D6m30IYlB0/ciwevEJxf/IX3pjHnjMbMx94DbN2 kD25sfFKTEd2LSx7sCbI7imhPuHmlB7gu3D38wUGP152A2EPgcmB9AsaKxBh0Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Z2G7t1zCDz94H; Tue, 25 Feb 2025 11:48:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 51PBmAU8050766; Tue, 25 Feb 2025 11:48:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 51PBmAve050763; Tue, 25 Feb 2025 11:48:10 GMT (envelope-from git) Date: Tue, 25 Feb 2025 11:48:10 GMT Message-Id: <202502251148.51PBmAve050763@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 405b1e50926d - main - sound: Do not fail from vchan_destroy() if children list is empty List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org 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: 405b1e50926d4162fb9503644073c0184a8b37d9 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=405b1e50926d4162fb9503644073c0184a8b37d9 commit 405b1e50926d4162fb9503644073c0184a8b37d9 Author: Christos Margiolis AuthorDate: 2025-02-25 11:43:11 +0000 Commit: Christos Margiolis CommitDate: 2025-02-25 11:43:11 +0000 sound: Do not fail from vchan_destroy() if children list is empty vchan_destroy() should be able to call chn_kill() regardless of whether the channel has been added to the children list yet or not. Also remove the CHN_F_BUSY check. There is no reason we shouldn't execute the code below if the parent is not busy. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D48185 --- sys/dev/sound/pcm/vchan.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/sys/dev/sound/pcm/vchan.c b/sys/dev/sound/pcm/vchan.c index 4165d0712b94..ea8a50b316fe 100644 --- a/sys/dev/sound/pcm/vchan.c +++ b/sys/dev/sound/pcm/vchan.c @@ -838,15 +838,8 @@ vchan_destroy(struct pcm_channel *c) CHN_UNLOCK(c); - if (!(parent->flags & CHN_F_BUSY)) - return (EBUSY); - - if (CHN_EMPTY(parent, children)) - return (EINVAL); - /* remove us from our parent's children list */ CHN_REMOVE(parent, c, children); - if (CHN_EMPTY(parent, children)) { parent->flags &= ~(CHN_F_BUSY | CHN_F_HAS_VCHAN); chn_reset(parent, parent->format, parent->speed);