Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > muc.lists.freebsd.multimedia > #13532

[Bug 299272] snd_hda: devctl_notify() called with HDA driver mutex held on jack change

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 <bug-299272-12827@https.bugs.freebsd.org/bugzilla/> (permalink)
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

Show key headers only | View raw


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

Back to muc.lists.freebsd.multimedia | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

[Bug 299272] snd_hda: devctl_notify() called with HDA driver mutex held on jack change bugzilla-noreply@freebsd.org - 2026-10-10 09:09 +0000
  [Bug 299272] snd_hda: devctl_notify() called with HDA driver mutex held on jack change bugzilla-noreply@freebsd.org - 2026-10-10 18:27 +0000
  [Bug 299272] snd_hda: devctl_notify() called with HDA driver mutex held on jack change bugzilla-noreply@freebsd.org - 2026-10-14 09:58 +0000
  [Bug 299272] snd_hda: devctl_notify() called with HDA driver mutex held on jack change bugzilla-noreply@freebsd.org - 2026-11-03 16:51 +0000
  [Bug 299272] snd_hda: devctl_notify() called with HDA driver mutex held on jack change bugzilla-noreply@freebsd.org - 2026-11-03 16:51 +0000
  [Bug 299272] snd_hda: devctl_notify() called with HDA driver mutex held on jack change bugzilla-noreply@freebsd.org - 2026-11-03 17:14 +0000
  [Bug 299272] snd_hda: devctl_notify() called with HDA driver mutex held on jack change bugzilla-noreply@freebsd.org - 2026-11-06 08:43 +0000
  [Bug 299272] snd_hda: devctl_notify() called with HDA driver mutex held on jack change bugzilla-noreply@freebsd.org - 2026-11-13 08:03 +0000
  [Bug 299272] snd_hda: devctl_notify() called with HDA driver mutex held on jack change bugzilla-noreply@freebsd.org - 2026-11-13 08:04 +0000

csiph-web