Path: csiph.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: 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 Xref: csiph.com muc.lists.freebsd.multimedia:13532 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D299272 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=3D275549&action= =3Dedit 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_WA= ITOK 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 =3D 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_handle= r() already does around mix_setrecsrc(). Patch attached. Tested on the same machine: the notifications are still sent (SND CONN OUT cdev=3Ddsp3 / dsp4) and WITN= ESS no longer reports anything on plug/unplug. --=20 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