From nobody Fri Nov 21 23:56:58 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4dCsZj5WVsz6HywN; Fri, 21 Nov 2025 23:57:01 +0000 (UTC) (envelope-from christos@freebsd.org) Received: from margiolis.net (mail.margiolis.net [95.179.159.8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA512) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4dCsZj2Yrnz4Jhw; Fri, 21 Nov 2025 23:57:01 +0000 (UTC) (envelope-from christos@freebsd.org) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=default; bh=bmdFzhPN6RfC 6GW/xgHREf6fgrFJAgxfwoAPF/pjMpM=; h=in-reply-to:references:to:from: subject:cc:date; d=margiolis.net; b=PJQ/KWmbLoHbDA1uAaitH39n+T2cTk3e1E PlYoKZp9U0HMQzYMoS6i7y4mlJQbSUH+x8/LJkk8pFhm648hmiGD+gSJ8QPnZ9Gdwoy6JU 1WBtD83x2kyhlTo0PnbBkSuzXkH3G+n23F1hA+3L6EyFJ36g651VEz5Ex4hgUfxRWD4= Received: from localhost (178.43.235.11.ipv4.supernova.orange.pl [178.43.235.11]) by margiolis.net (OpenSMTPD) with ESMTPSA id 6fcaf2ea (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 21 Nov 2025 16:56:59 -0700 (MST) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Sat, 22 Nov 2025 00:56:58 +0100 Message-Id: Cc: , , Subject: Re: git: 9d18115ca0ab - main - sound: Retire snd_mtx* wrappers From: "Christos Margiolis" To: "Shawn Webb" X-Mailer: aerc 0.21.0 References: <69209007.369f8.65e30118@gitrepo.freebsd.org> In-Reply-To: X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:20473, ipnet:95.179.144.0/20, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4dCsZj2Yrnz4Jhw On Sat Nov 22, 2025 at 12:54 AM CET, Shawn Webb wrote: > On Sat, Nov 22, 2025 at 12:50:19AM +0100, Christos Margiolis wrote: >> On Fri Nov 21, 2025 at 9:46 PM CET, Shawn Webb wrote: >> > On Fri, Nov 21, 2025 at 08:45:27PM +0000, Shawn Webb wrote: >> >> On Fri, Nov 21, 2025 at 04:15:03PM +0000, Christos Margiolis wrote: >> >> > The branch main has been updated by christos: >> >> >=20 >> >> > URL: https://cgit.FreeBSD.org/src/commit/?id=3D9d18115ca0ab0ef3f341= 73d4e2bdabec916d0b60 >> >> >=20 >> >> > commit 9d18115ca0ab0ef3f34173d4e2bdabec916d0b60 >> >> > Author: Christos Margiolis >> >> > AuthorDate: 2025-11-21 16:14:33 +0000 >> >> > Commit: Christos Margiolis >> >> > CommitDate: 2025-11-21 16:14:47 +0000 >> >> >=20 >> >> > sound: Retire snd_mtx* wrappers >> >> > =20 >> >> > Do not create mutexes with snd_mtxcreate(). It doesn't provide = any >> >> > value, plus it first allocates the mutex with malloc(9). Alloca= te >> >> > mutexes in the stack and use mtx_* functions directly instead o= f the >> >> > snd_mtx* wrappers. >> >> > =20 >> >> > Sponsored by: The FreeBSD Foundation >> >> > MFC after: 1 week >> >> > Reviewed by: kib, markj >> >> > Differential Revision: https://reviews.freebsd.org/D53855 >> >>=20 >> >> Hey Christos, >> >>=20 >> >> I'm getting the following error on buildkernel: >> >>=20 >> >> =3D=3D=3D=3D BEGIN LOG =3D=3D=3D=3D >> >> /usr/src/sys/dev/sound/pci/hdspe-pcm.c:726:3: error: call to undeclar= ed function 'snd_mtxunlock'; ISO C99 and later do not support implicit func= tion declarations [-Werror,-Wimplicit-function-declaration] >> >> 726 | snd_mtxunlock(sc->lock); >> >> | ^ >> >> 1 error generated. >> >> --- hdspe-pcm.o --- >> >> =3D=3D=3D=3D END LOG =3D=3D=3D=3D >> > >> > Never mind. I didn't realize HardenedBSD had a change to that file. >> > Sorry for the noise! >>=20 >> So all good? Out of curiousity, what change is there on HardenedBSD? > > Yeah, all good. There's a potential NULL pointer dereference due to a > lack of a return value check from malloc(..., M_NOWAIT). I haven't > done any determination as to whether the bug is triggerable, but it > exists nonetheless. > > Thanks, I'll look into it. Thanks. Christos