From: Takashi Iwai <tiwai@suse.de>
To: Runyu Xiao <runyu.xiao@seu.edu.cn>
Cc: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org, Jianhao Xu <jianhao.xu@seu.edu.cn>
Subject: Re: [PATCH] ALSA: mpu401: shut down timer before freeing MPU
Date: Mon, 28 Sep 2026 14:24:27 +0200 [thread overview]
Message-ID: <87jyo55zt0.wl-tiwai@suse.de> (raw)
In-Reply-To: <20260927093809.681726-1-runyu.xiao@seu.edu.cn>
On Sun, 27 Sep 2026 11:38:09 +0200,
Runyu Xiao wrote:
>
> When an MPU401 interface has no usable IRQ, the driver polls raw-MIDI
> input and output with a timer. During raw-MIDI teardown, the timer callback
> can already be running when snd_mpu401_uart_remove_timer() clears the last
> mode bit and calls timer_delete(). That API neither waits for a running
> callback nor prevents it from rearming the timer, and free_irq() does not
> synchronize timer callbacks. snd_mpu401_uart_free() can therefore release
> mpu while the timer callback still uses it.
>
> Initialize the timer once when the MPU object is created and only rearm it
> while a timer mode is active. Shut it down synchronously after freeing the
> IRQ so an in-flight callback completes before mpu and its resources are
> released.
>
>
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Cc: stable@vger.kernel.org
> Assisted-by: LLM
> Signed-off-by: Runyu Xiao <runyu.xiao@seu.edu.cn>
Applied to for-next branch. Thanks.
Takashi
prev parent reply other threads:[~2026-09-28 12:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-27 9:38 Runyu Xiao
2026-09-28 12:24 ` Takashi Iwai [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87jyo55zt0.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=jianhao.xu@seu.edu.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=runyu.xiao@seu.edu.cn \
--cc=stable@vger.kernel.org \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®