From nobody Fri Nov 20 09:49:02 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 4jW9XH0dWMz71TBS for ; Fri, 20 Nov 2026 09:49:03 +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 4jW9XG6VsKz4qCR for ; Fri, 20 Nov 2026 09:49:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795168142; 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=FhaFYqFSFBA5TI8TkFP1dO4pWUDJFbvkais8dUNV8jo=; b=XliGP5hCTlp0CWaRz5TB7C9FgGwAhVUh2WjIeYdR6fW2x2oFstSmRjcHiBVT0U8Xpj+8sX YwTlyG5VvPVCR032weSSpndY5BD/BsMjF7moh0gvNbToqwM2YKKFbQ1f2wLNH/ca+uGj9G gXOhI4PimN5Bo4k6+RD7SgbArI1Wo8/l2tmFd4/4sMNiWmrocdkK2vymFRCnP7OHZdt5nT ffbIQYJvgAlIGu7Sn+sohudQLMA+8Apf5x0JCMsOp8rxRIUcChGPMb1MsxtB7Tyd0RCxMF Uws3NBd/2PHE/EoitxUVBlywFat6QsjVtvZyFYZWjvuz7rod+qwqW4hYWxBbuA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795168142; b=VuQnF5xsXCtyivIwYpTRZNSK2Idtz1t/UU0jdkM50DbOwBEouYBWYe5oyCnN/6p7cohzKh olU0qbTrqY1qcATR/HUNRyihf0LDCix5XX9QTGsaffdb7V0r8kRqhsocxuxnQsAAKdWr8d AT7Ph5Eff/X25+uC7mbCQGYNIv0AjZkh2R8JeHS9v28fLOJgav4vvi4KxSYuZsBZ64BWIm idyFs6x6VqXFX6BdIeYrQO1vKytnr8C2T6kwL5NgnJX68nTwh1/1vDruf3hW8r2J57Aepo DbZYdYo53alO4390lh7Hc8ZSTR+gcx9SIoNB2gKQHxgBb7dRLQmOGrWsdNalZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795168142; 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=FhaFYqFSFBA5TI8TkFP1dO4pWUDJFbvkais8dUNV8jo=; b=WQONDZoDJSVSvIWEbP95LBtmss1fIfxUHyRQbgyrqr1jmen3ZnNzcHo/5apUXMBJlfPS59 CvE3rdjwO1FaxakNB9dKzt61VAUrp3VBjyOMIewbraYqmR129PtvExTkOa9oRIre8Y1YrX X9MBp4yPhCWQX1cWw6S5sstd3PQrHpNaXV5+ZrtYeLbTiaupjOXLapEQXmXcxRifcXuvhw bgEkakZZC/xQ0YN72Jg3if+bRJ4iXXdGXooBtM49wcBVgfFzZ0+JM3pUXtme75QzBtk91v Dz47bdSxSjDY6w+oNVNgvlS4LwYSLbxC1irRs7ZpNoMCgp9bIY+HfaXBz32bSg== 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 4jW9XG69KJzkMn for ; Fri, 20 Nov 2026 09:49:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 151c8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 20 Nov 2026 09:49:02 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: 682a7750f6c0 - stable/15 - 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/stable/15 X-Git-Reftype: branch X-Git-Commit: 682a7750f6c07bc367e573fc9fdfa90eb8e5bf9f Auto-Submitted: auto-generated Date: Fri, 20 Nov 2026 09:49:02 +0000 Message-Id: <6b00178e.151c8.1e2cb31@gitrepo.freebsd.org> The branch stable/15 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=682a7750f6c07bc367e573fc9fdfa90eb8e5bf9f commit 682a7750f6c07bc367e573fc9fdfa90eb8e5bf9f Author: Christos Margiolis AuthorDate: 2026-11-13 12:48:09 +0000 Commit: Christos Margiolis CommitDate: 2026-11-20 09:45:52 +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 (cherry picked from commit dabd959b17597ad790327020a667ced9a05d7499) --- 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 d574c7fbc93f..1c364ce44232 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,