Article View: muc.lists.freebsd.multimedia
Article #5[Bug 299272] snd_hda: devctl_notify() called with HDA driver mutex held on jack change
From: bugzilla-noreply
Date: Sat, 10 Oct 2026 09:09
Date: Sat, 10 Oct 2026 09:09
63 lines
4144 bytes
4144 bytes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=299272
Bug ID: 299272
Summary: snd_hda: devctl_notify() called with HDA driver mutex
held on jack change
Product: Base System
Version: Unspecified
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: kern
Assignee: bugs@FreeBSD.org
Reporter: david@crap.solutions
CC: christos@freebsd.org, multimedia@FreeBSD.org
Created attachment 275549
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=275549&action=edit
snd_hda: drop the driver lock around jack devctl notifications
hdaa_presence_handler() sends the SND CONN devctl notification while holding
the HDA driver mutex. With sysevent loaded, devctl_notify() can sleep (M_WAITOK
allocation, genetlink sx lock), so WITNESS complains when headphones are
plugged
in or out:
uma_zalloc_debug: zone "malloc-16" with the following non-sleepable locks
held:
exclusive sleep mutex hdac1 (HDA driver mutex) r = 0 locked @
sys/dev/sound/pci/hda/hdac.c:1131
lock order reversal: (sleepable after non-sleepable)
1st hdac1 (HDA driver mutex, sleep mutex) @
sys/dev/sound/pci/hda/hdac.c:1131
2nd genetlink lock (genetlink lock, sx) @ sys/netlink/netlink_generic.c:483
...
devctl_notify+0x5e
hdaa_presence_handler+0x2a0
hdaa_unsol_intr+0xcd
hdac_unsolq_task+0x99
Seen on FreeBSD 16.0-CURRENT (GENERIC with WITNESS), ThinkPad T14 Gen 1,
Realtek ALC257, when plugging headphones into the laptop jack.
Fix: drop the driver lock around devctl_notify(), as hdaa_autorecsrc_handler()
already does around mix_setrecsrc(). Patch attached. Tested on the same
machine:
the notifications are still sent (SND CONN OUT cdev=dsp3 / dsp4) and WITNESS no
longer reports anything on plug/unplug.
--
You are receiving this mail because:
You are on the CC list for the bug.
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-admin@muc.de
Technical Details
Message-ID:
<bug-299272-12827@https.bugs.freebsd.org/bugzilla/>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!2.eu.feeder.erje.net!3.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.space.net!news.muc.de!.POSTED.news.muc.de!not-for-mailShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!2.eu.feeder.erje.net!3.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.space.net!news.muc.de!.POSTED.news.muc.de!not-for-mail From: bugzilla-noreply@freebsd.org Newsgroups: muc.lists.freebsd.multimedia Subject: [Bug 299272] snd_hda: devctl_notify() called with HDA driver mutex held on jack change Date: Sat, 10 Oct 2026 09:09:12 +0000 Organization: Newsgate at muc.de e.V. Sender: owner-freebsd-multimedia@FreeBSD.org Approved: news-admin@muc.de Distribution: world Message-ID: <bug-299272-12827@https.bugs.freebsd.org/bugzilla/> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: news.muc.de; posting-host="news.muc.de:193.149.48.2"; logging-data="17125"; mail-complaints-to="news-admin@muc.de" X-Original-To: multimedia@mlmmj.nyi.freebsd.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1791623353; 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=Me0sUZ6dHotBgYqzFAZino0VL7O1BGQgIEIJzlatU0c=; b=EhTsyl5CEEN2pK5HYYgK4vtRHaBlLI4YyrjuCY9NCJx6AnXlmobHg9Vunbq+SDgAp3uuYI QumD/twRHf4BDp/cjK7orpSl05xt4/PaSc9MtCfL3IFvkoCWul3I8Jkcwr7a+19p2cejMH x6L1hpYGfKwoMk41Ylv0mcDArClq7t6f1A8tl1cED/7oAXepfz3EUM9pWLpspZlDSGbLMW HJ5HWzilKdyU90UL2/pgKbfPiAvEg4QNfRtlKGJqg17Qhh6AwfiNU5VBvu68NU6yGHXEZG bj0WLNPwUXBP8+we2OK1IOC+V1HLVBT2TyeBkIictvAXXcC5ciLGucwyVqOgOA== X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f Auto-Submitted: auto-generated Precedence: list X-Newsgate-Id: f02c70b8849f+ X-No-Archive: Yes