From nobody Thu Nov 12 16:38:06 2026 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 4jQQzy4FTkz70sW8 for ; Thu, 12 Nov 2026 16:38:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jQQzy35wxz4JKD for ; Thu, 12 Nov 2026 16:38:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794501486; 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=tN0Adq2mVzNNvh9PYlksh3G/ekwizlj9VCn6PFrst80=; b=lwcEZ8xRvNNoP5rMxdyNUtdMyZQ1MDfYlYjCpHD5PiJ99boyx0h1BzqqThFTYcTUsdNtd6 K+XwzF1UoTHE8aEJHq2qeE+8t9VmZiRrUrbslX/fHXycjfQSH1bBXeLApDPZJO2Guqy+Ch I494SBAx8Feg2EEPQAYh/dT1Z8poGmky3vkPSJFwf/m6iK8xAbfHnxLb8Z8Jbfu3E0bmqH xk6DYk9+1a3dZoOUwx9cuGEtrpmA0+LKEOHP6MuBwNpkgC3NuVP0KEwd7OBmbPJwlJ3g9M v7iRmPZ3Gzj72t+E/q5akewhlK/rUSABxAViqMQ6jRirQAR36Zicnh018XIujQ== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1794501486; b=M2iemQYDvwgCYTYvajBQycSHF/8FbOjZELojRV5zCxj7rdT8c+dWao/hZo/NvZ/nbxvb5t TCsOtfg2InhnfVXLk8a401utk7HUYg4+fHW+XMYKA2MWyM82enL928IMrCnDvgRaB4Lsk3 0AMTSQreOwMczs3O0KOqQ63mVX3Gz0utlqayhP+GQKJucdvhDdDECvWnZi1maPh9BHUKqs saiDkpFt0Ju2PQiTbWMNIfK+TGxZ8BGiLemgo5apg4W5Jc1i21K5OxOVJ2jMmdsmdlI8sC UxysVlZTOA2wW5kHDQn3S0B7qPNeFYOtcwtGb+pE05P4qMp+nq50QBD6gt9mhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794501486; 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=tN0Adq2mVzNNvh9PYlksh3G/ekwizlj9VCn6PFrst80=; b=vAn5DnCXzjpD8GHij8dydIOjGO9hjEMEznyEDgIQB96B0No9nq/ME1cKegJqYZsKBkQPaI N7FjJEq+UEBERdkLOJrWGJP1tpaMPo59lPVpJf4Ldd1eJ3Oklg86jBRlAl+6Ed4dBLnwPO yygaUmbxJSEDXSXtVj3F3oBY9cEwAWENSCdBEYCGokgj6pgzCfKDa2e3JolYsceqe/Dp24 zgvL01PzP4X6DUMA2ABxJBS7D5arCChI5TKDO2W4oOitaJTKeKS5OiIgR5HSo1aqgVcgRc mMAPY4sTetQdmRDdaZ1Huwlq0WhiSbfXgEELGLMp8a8ldCU6fEOMpOVp01pshw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jQQzy1VNvz19dR for ; Thu, 12 Nov 2026 16:38:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 23c5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 12 Nov 2026 16:38:06 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: c8d1c9474123 - main - snd_dummy: Do not use dummy_chan_io() as mpu401's interrupt handler List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org List-Id: Commit messages for all branches of the src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c8d1c94741231d95964b91910880769019478854 Auto-Submitted: auto-generated Date: Thu, 12 Nov 2026 16:38:06 +0000 Message-Id: <6af5eb6e.23c5.59233a3e@gitrepo.freebsd.org> The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=c8d1c94741231d95964b91910880769019478854 commit c8d1c94741231d95964b91910880769019478854 Author: Christos Margiolis AuthorDate: 2026-11-10 13:02:13 +0000 Commit: Christos Margiolis CommitDate: 2026-11-12 16:35:48 +0000 snd_dummy: Do not use dummy_chan_io() as mpu401's interrupt handler dummy_chan_io() runs with sc->lock held, but mpu401 calls its handler from a callout with no mutex associated with it, so writing to the MIDI device node caused a panic. Give mpu401 its own handler, and leave MIDI to mpu401's timer instead of the PCM callout. Fixes: e963472ef853 ("snd_dummy: Initial MIDI support") Sponsored by: The FreeBSD Foundation --- sys/dev/sound/dummy.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/sys/dev/sound/dummy.c b/sys/dev/sound/dummy.c index afe3c0a59fe0..54c1ae493c01 100644 --- a/sys/dev/sound/dummy.c +++ b/sys/dev/sound/dummy.c @@ -98,9 +98,6 @@ dummy_chan_io(void *arg) struct dummy_chan *ch; int i = 0; - if (sc->mpu_intr) - (sc->mpu_intr)(sc->mpu); - if (sc->stopped) return; @@ -324,6 +321,15 @@ dummy_mpu_uninit(struct mpu401 *arg, void *cookie) return (0); } +static void +dummy_mpu_intr(void *arg) +{ + struct dummy_softc *sc = arg; + + if (sc->mpu_intr != NULL) + (sc->mpu_intr)(sc->mpu); +} + static kobj_method_t dummy_mpu_methods[] = { KOBJMETHOD(mpufoi_read, dummy_mpu_read), KOBJMETHOD(mpufoi_write, dummy_mpu_write), @@ -393,7 +399,7 @@ dummy_attach(device_t dev) */ make_dev_alias(sc->info.dsp_dev, "dsp.dummy"); - sc->mpu = mpu401_init(&dummy_mpu_class, sc, dummy_chan_io, + sc->mpu = mpu401_init(&dummy_mpu_class, sc, dummy_mpu_intr, &sc->mpu_intr); if (sc->mpu == NULL) return (ENXIO);