🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: muc.lists.freebsd.multimedia
Article #21

[Bug 299418] After the FreeBSD-SA-26:71.sound update loading the multimedia/cx88 driver causes a kernel panic

#21
From: bugzilla-noreply
Date: Fri, 16 Oct 2026 04:59
49 lines
4183 bytes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=299418

Jason A. Harmening <jah@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |christos@freebsd.org

--- Comment #4 from Jason A. Harmening <jah@FreeBSD.org> ---
I'll try to create a local repro as soon as I can get in front of the right
machine.

I think part of the reason for the panic may actually be that recent-ish
sound(4) changes seem to make it more difficult to properly clean up from an
intermediate failure like the one seen here.

Prior to
https://cgit.freebsd.org/src/commit/sys/dev/sound/pcm/?id=3107b952f534813846e4f58afdb57624a81618d8,
pcm_unregister() was only gated on PCM_ALIVE(), so as long as pcm_init() had
previously been called it would proceed to tear down all channels, uninit the
mixer, etc.  So if a driver executed a call sequence like
pcm_init()/mixer_init()/pcm_addchan()/pcm_register() and encountered an error
in one of the intermediate steps, in theory it only needed to call
pcm_unregister() to properly clean up.  Some of the in-tree sound drivers
appear to be written with this assumption.

Now that pcm_unregister() is gated on PCM_REGISTERED(), it won't do anything
unless pcm_register() has already been called, so if a driver hits an error
before calling pcm_register() and tries to clean up using pcm_unregister() it
may end up leaking a bunch of resources and potentially running into the mixer
reinit panic seen here.

It may be that the recommended sequence these days is to call pcm_register()
even if an earlier step fails, but if so that should probably be documented
somewhere and made consistent in-tree.

-- 
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-299418-12827-5ywMv71ecA@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!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.space.net!news.muc.de!.POSTED.news.muc.de!not-for-mail
References: <bug-299418-12827@https.bugs.freebsd.org/bugzilla/>

Show 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!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 299418] After the FreeBSD-SA-26:71.sound update loading the
 multimedia/cx88 driver causes a kernel panic
Date: Fri, 16 Oct 2026 04:59:01 +0000
Organization: Newsgate at muc.de e.V.
Sender: owner-freebsd-multimedia@FreeBSD.org
Approved: news-admin@muc.de
Distribution: world
Message-ID: <bug-299418-12827-5ywMv71ecA@https.bugs.freebsd.org/bugzilla/>
References: <bug-299418-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="41304"; 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=1792126741;
	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:
	 in-reply-to:in-reply-to:references:references;
	bh=vjEXPXCn9HZMU/C3Uf0sahTWZ6TG4XxHI7CUPnRXu7g=;
	b=tbLc3XZZ6qHC51EOWRPLn5NtlHBqBp+tXjLQw7y1EjHPSRrVNzOOrISP51N66C++VB99Nm
	4G69XEpDvabcSCNl6kl5NYL7NTX4I1Trla3veH6E7EPVD2jQO8Uq321ud/Ke5fsJcO8GjB
	5DK0nWKfONEGY6TIDIMuh+ePPlfcdfvIPfIW15BOM0XEJ8DMThQwwTcBYiYu1oze1EOyCS
	BYadeYiBVw7fCTBpGWWt3PvmQzJE3RWQ1rwtqOmt9GNaGfnaNEkjo+ggQ3yNWYV4EQXxHM
	dbv00Aze3FlidFGMHvBWrQORPm45OM8kfmf08JcLco9yFmE6nCIrUm8psDquFg==
X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f
In-Reply-To: <bug-299418-12827@https.bugs.freebsd.org/bugzilla/>
Auto-Submitted: auto-generated
Precedence: list
X-Newsgate-Id: f02c70b8849f+
X-No-Archive: Yes