🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: muc.lists.freebsd.multimedia
9 messages
9 total messages Started by bugzilla-noreply Sat, 10 Oct 2026 09:09
[Bug 299272] snd_hda: devctl_notify() called with HDA driver mutex held on jack change
#5
Author: bugzilla-noreply
Date: Sat, 10 Oct 2026 09:09
63 lines
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
[Bug 299272] snd_hda: devctl_notify() called with HDA driver mutex held on jack change
#4
Author: bugzilla-noreply
Date: Sat, 10 Oct 2026 18:27
17 lines
2694 bytes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=299272

Mark Linimon <linimon@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|bugs@FreeBSD.org            |multimedia@FreeBSD.org

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee 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
[Bug 299272] snd_hda: devctl_notify() called with HDA driver mutex held on jack change
#15
Author: bugzilla-noreply
Date: Wed, 14 Oct 2026 09:58
17 lines
2699 bytes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=299272

Christos Margiolis <christos@freebsd.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|multimedia@FreeBSD.org      |christos@freebsd.org

-- 
You are receiving this mail because:
You are the assignee for the bug.
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
[Bug 299272] snd_hda: devctl_notify() called with HDA driver mutex held on jack change
#59
Author: bugzilla-noreply
Date: Tue, 03 Nov 2026 16:51
16 lines
2655 bytes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=299272

Christos Margiolis <christos@freebsd.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|New                         |In Progress

-- 
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
[Bug 299272] snd_hda: devctl_notify() called with HDA driver mutex held on jack change
#60
Author: bugzilla-noreply
Date: Tue, 03 Nov 2026 16:51
13 lines
2545 bytes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=299272

--- Comment #1 from Christos Margiolis <christos@freebsd.org> ---
Related discussion in: https://github.com/freebsd/freebsd-src/pull/2468

-- 
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
[Bug 299272] snd_hda: devctl_notify() called with HDA driver mutex held on jack change
#61
Author: bugzilla-noreply
Date: Tue, 03 Nov 2026 17:14
13 lines
2534 bytes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=299272

--- Comment #2 from Christos Margiolis <christos@freebsd.org> ---
Fix submitted for review: https://reviews.freebsd.org/D61161

-- 
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
[Bug 299272] snd_hda: devctl_notify() called with HDA driver mutex held on jack change
#64
Author: bugzilla-noreply
Date: Fri, 06 Nov 2026 08:43
42 lines
3482 bytes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=299272

--- Comment #3 from commit-hook@FreeBSD.org ---
A commit in branch main references this bug:

URL:
https://cgit.FreeBSD.org/src/commit/?id=66d078c17294ca2ea225e4926a8cd9697dda57ed

commit 66d078c17294ca2ea225e4926a8cd9697dda57ed
Author:     Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2026-11-03 16:51:08 +0000
Commit:     Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2026-11-06 08:42:37 +0000

    netlink: Pre-register the missing devctl event systems

    devctl_notify() can be called with a mutex held. If the event system is
    not listed in devctl_systems[], sysevent_get_group() calls
    sysevent_new_group(), which calls strdup() with M_WAITOK, and we may end
    up sleeping while holding a non-sleepable mutex.

    Add the missing systems.

    While here, remove the nonexistent KERNEL system.

    PR:             299272
    MFC after:      1 week
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D61161

 sys/netlink/netlink_sysevent.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

-- 
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
[Bug 299272] snd_hda: devctl_notify() called with HDA driver mutex held on jack change
#85
Author: bugzilla-noreply
Date: Fri, 13 Nov 2026 08:03
44 lines
3540 bytes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=299272

--- Comment #4 from commit-hook@FreeBSD.org ---
A commit in branch stable/15 references this bug:

URL:
https://cgit.FreeBSD.org/src/commit/?id=03466b1de5f8358db6d60eb9a72b3d121be47e64

commit 03466b1de5f8358db6d60eb9a72b3d121be47e64
Author:     Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2026-11-03 16:51:08 +0000
Commit:     Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2026-11-13 08:02:14 +0000

    netlink: Pre-register the missing devctl event systems

    devctl_notify() can be called with a mutex held. If the event system is
    not listed in devctl_systems[], sysevent_get_group() calls
    sysevent_new_group(), which calls strdup() with M_WAITOK, and we may end
    up sleeping while holding a non-sleepable mutex.

    Add the missing systems.

    While here, remove the nonexistent KERNEL system.

    PR:             299272
    MFC after:      1 week
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D61161

    (cherry picked from commit 66d078c17294ca2ea225e4926a8cd9697dda57ed)

 sys/netlink/netlink_sysevent.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

-- 
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
[Bug 299272] snd_hda: devctl_notify() called with HDA driver mutex held on jack change
#86
Author: bugzilla-noreply
Date: Fri, 13 Nov 2026 08:04
17 lines
2664 bytes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=299272

Christos Margiolis <christos@freebsd.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|In Progress                 |Closed

-- 
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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads