From nobody Sat Nov 14 09:49: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 4jRTqn3sDdz70gyR for ; Sat, 14 Nov 2026 09:49: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 4jRTqn1N6Vz4flN for ; Sat, 14 Nov 2026 09:49:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794649781; 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=wtoX5tZDauOdJDJz3eeYM4N6AFA9+v0jlan+qs2M3B4=; b=tVsaNN90l6FHyijO4/1P0CcZ8VarSUy4uOGyqJ5NZzgXOw8Tv6OQdrIY+8Gzk02ruMdG7H n/gmDqqXnyEokGIWDjE/ciwgL5CRcuGciPoqTMwMiHYUORy/kIFsUqpLR0Td1UUOsiSWVM 29edyxD/4ocJ+hCcwyRjhBYQBMR7ix/GQJfN100ZV+GGjbNhq53SSI+2kYaNQDiYxyI4/U 3pvmAu+r9ypAHIACHfP2R4R9Xs/1+mdEv5yvZv0HJRhyx8z/s7KcRK25qumuDay9fmwvIl b9Anxxr0V0aYoiT3OWCIugcF7VXXy54LnqdfYEhNZqredpFnhnPxlTkKXlfBdw== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1794649781; b=QURFnKALG1sHCojPf5EN3spAixplZgQC5FkMC0HvwSTWfthmKHNhibAj5+hymHsS32zOEh pI/n1sMYVn7rcJoIeUXhtsuWKMNTL2PGfD+/zhD0DUZ0p1gaKdJ6WhhvyqR4dEBmOMN61T fFWnX+hgFWP5dmuZRe7pLpIgI7vdKlBMBqBNm2XNwBUKCIbkWuuLipxOoe1sW/fLp3hWsF m0XzsGBYbPKvsd1xhGlTFzeWBLZOzpBSw96YSXo4+xZjJCP4GAol3fRpNCOR6S+AB9DWXR gTsxy5bQlqGfGAVMfWNBLeX6uzViIZQVQDEyLayIfn5u8jcOIHSgnIs3Xs1MhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794649781; 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=wtoX5tZDauOdJDJz3eeYM4N6AFA9+v0jlan+qs2M3B4=; b=IjkG8YcPQhpoF1jMRUtQWAytLZ94WZ6n0gtovBoNcWaHdBK0khAQQfccmTXs6B7DAca6vU d5tsjVrq3nQ7BwEYp5ZoHfrtzMymrU1JrLOZKqxOXG/iWhymeI/Ii3JbEocXZb3rUrNn6w EQ3C7YskphHn5ZxpqqqoRfUpv0c0ipPUQTQmGUcqeOH93RiDkIrIKbnLOX0tAP8gCTUbli 6om86vXgRfErWIXhKdFlo1CMBD+r7OVS9ohQpLskkgFnP23+4eHfcOclSxownZMkGqByOl ABuhO+s0BGeltIENsIPRfhHj/M7ahlw9u/fGiDeaDY9qi6583NQwWStKkmnTBA== 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 4jRTqn0jpNzGnw for ; Sat, 14 Nov 2026 09:49:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 15376 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 14 Nov 2026 09:49:41 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: dabd959b1759 - main - snd_uaudio: Do not touch mixer_lock when there is no mixer 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: dabd959b17597ad790327020a667ced9a05d7499 Auto-Submitted: auto-generated Date: Sat, 14 Nov 2026 09:49:41 +0000 Message-Id: <6af82eb5.15376.272d87c7@gitrepo.freebsd.org> The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=dabd959b17597ad790327020a667ced9a05d7499 commit dabd959b17597ad790327020a667ced9a05d7499 Author: Christos Margiolis AuthorDate: 2026-11-13 12:48:09 +0000 Commit: Christos Margiolis CommitDate: 2026-11-14 09:49:14 +0000 snd_uaudio: Do not touch mixer_lock when there is no mixer Using the mixer lock unconditionally panics because the lock is uninitialized on devices with no audio interfaces, for instance MIDI-only keyboards. Fixes: 9a00e0b8ca56 ("snd_uaudio: Do not use snd_mixer->lock as mixer_lock") MFC after: 3 days Sponsored by: The FreeBSD Foundation Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D61506 --- sys/dev/sound/usb/uaudio.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sys/dev/sound/usb/uaudio.c b/sys/dev/sound/usb/uaudio.c index fc4891aff2ee..f918e1245c47 100644 --- a/sys/dev/sound/usb/uaudio.c +++ b/sys/dev/sound/usb/uaudio.c @@ -1148,7 +1148,11 @@ uaudio_attach(device_t dev) bus_attach_children(dev); - if (uaudio_handle_hid) { + /* + * Gate on mixer_dev, otherwise a device with no audio interfaces, such + * as a MIDI-only keyboard, will end up using an uninitialized mutex. + */ + if (uaudio_handle_hid && sc->sc_child[0].mixer_dev != NULL) { if (uaudio_hid_attach(sc, uaa) == 0) { device_printf(dev, "HID volume keys found.\n"); } else { @@ -1157,7 +1161,8 @@ uaudio_attach(device_t dev) } /* reload all mixer settings */ - uaudio_mixer_reload_all(sc); + if (sc->sc_child[0].mixer_dev != NULL) + uaudio_mixer_reload_all(sc); /* enable S/PDIF output, if any */ if (sc->sc_set_spdif_fn(sc,