From nobody Fri Nov 13 11:00:07 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 4jQvRW5DJsz70LXT for ; Fri, 13 Nov 2026 11:00:07 +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 4jQvRW2bxgz3JNM for ; Fri, 13 Nov 2026 11:00:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794567607; 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=fMhE7z9yeawGboh78JifAqzzSxongnWbzED98d136I0=; b=sQi74yQgQYxTmXTMhd5BR+Z9v3jacXDuhQ4stTJBWt/IYy3LIpAQV+DOcS1io/p2O6NO+b y/GhtBhqfGfjMRt0Y6DTeaEt6XzM3mn+e1UnJouu5SjWGvVwaASpjLzUP0JU7vaRdaba4p H5OUVpD+9oKHr76csqUtTV6yaZMPwiFCRUH07A0Og+t/cGRRwkWO+9QrcL4sDS4w5iEzXZ IO7n/LAhSUfycitk/8dGIuR4kqhPg0qQMfx33qy/NQudeNvZy9rapFp1hfu1bMtUM8tsJD 5qclM/KKuKBpw0l9jQReqkdGP892QbsZ7v6EZNn4chnnr6cMZAlXYFweBY2OZQ== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1794567607; b=Um3eYIaiK2BVZw9o1UvA7s/K+VDfIXRGJOa7ikZ1xIRRCVCHAXMjpvyzia91djMlvYNv2M CokvFcgSsJAbl4saTdy5Ah7+A+tTABqfpalflD/5zbVgTtb9rd19h3D4ZRRYM5KDlJWebV NMV0A3eCIe6B0vfVLBZRMc7oZTDjYw7jdhYwx7xbqJpYAee2/M9UH9FJSy8jB1ffcRNb3V Y70olPoWkCzQv9L8t/bzNo07LhimZwoYgbIpF2W1S1UP8rBjaGr0g8fwmNS/QLZR3Fa5qv cXIIxk0H5J/HHsFozI6iKysHRZiPAA7oyBbUphpMs2v9vLd+yVw2pbUVMsXvng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794567607; 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=fMhE7z9yeawGboh78JifAqzzSxongnWbzED98d136I0=; b=Mt/p1/Qlz8N3s4sTtzbX2L5lqdQP9dQ023glt7miNg4x5Cd4/SjF8mvXxLlLV6EzXWY8lt OyQT/An8u9CA20MxOGGz36O+rOipGRz73pOi0SbGoQ3YmqGEUzk3CZPRpy8eXS9p9Q5vdS IDrhYLepU/WnVts6NzL9t3Cu4Cki5l/te820CqPSF6pi64OZlxCsMeJaAIzl0T4bw7IPUK 61ml9xjb1Q74s+R9YO6nZAj84yx7zhFeSthoXpA71vHim8V0IEfv0myhVJ23aFElyFT06N V3lBk1ws20C/JjMdTbdCVlDwP9xW8pTkzbenZ8a090zI0t0e8Z67267IWJcgsg== 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 4jQvRW1KqkzWl2 for ; Fri, 13 Nov 2026 11:00:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 10804 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 13 Nov 2026 11:00:07 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 91539591d7f8 - main - sound/midi: Drain the mpu401 callout before device teardown 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: 91539591d7f8dd8ca24ced875bd16c3ba3c7d201 Auto-Submitted: auto-generated Date: Fri, 13 Nov 2026 11:00:07 +0000 Message-Id: <6af6edb7.10804.30243cfc@gitrepo.freebsd.org> The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=91539591d7f8dd8ca24ced875bd16c3ba3c7d201 commit 91539591d7f8dd8ca24ced875bd16c3ba3c7d201 Author: Christos Margiolis AuthorDate: 2026-11-13 10:59:46 +0000 Commit: Christos Margiolis CommitDate: 2026-11-13 10:59:46 +0000 sound/midi: Drain the mpu401 callout before device teardown midi_uninit() frees the snd_midi that mpu401_intr() reaches through midi_in() and midi_out(), but the callout that calls it was drained afterwards. Drain it first, and clear M_TXPEND so that a firing handler does not re-arm itself. Fixes: f960b33d35da ("sound/midi: Drain the mpu401 callout") MFC with: f960b33d35da Sponsored by: The FreeBSD Foundation --- sys/dev/sound/midi/mpu401.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/dev/sound/midi/mpu401.c b/sys/dev/sound/midi/mpu401.c index 20da11216c43..775d1905eeff 100644 --- a/sys/dev/sound/midi/mpu401.c +++ b/sys/dev/sound/midi/mpu401.c @@ -154,8 +154,10 @@ int mpu401_uninit(struct mpu401 *m) { CMD(m, MPU_RESET); - midi_uninit(m->mid); + /* Clear M_TXPEND so that the callout does not re-arm itself. */ + m->flags = 0; callout_drain(&m->timer); + midi_uninit(m->mid); kobj_delete((kobj_t)m, M_MIDI); return 0; }