diff options
| author | Cen Zhang <zzzccc427@gmail.com> | 2026-10-25 00:49:51 +0800 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2026-10-26 09:00:56 +0100 |
| commit | 9194d8dd4196fa3fb457de2909df468d501c01c2 (patch) | |
| tree | d18286b7f5b76587b48159fbe5575b413423508f /scripts/stackusage | |
| parent | 02b1d5127f37683448ef35798b3a6310d1d38761 (diff) | |
| download | linux-9194d8dd4196fa3fb457de2909df468d501c01c2.tar.gz linux-9194d8dd4196fa3fb457de2909df468d501c01c2.zip | |
ALSA: opl3: Shut down the timer after draining sequencer ports
The delayed-note timer is independent of the sequencer ports' use-locks
and runs code in snd-opl3-synth. Deleting the client drains the event
callbacks but does not cancel this timer. A direct fixed-duration NOTEON
without a subscription can arm it without any unuse callback to stop it.
A shutdown in only the native port's private_free callback is too early
to finish shared voice cleanup when the OSS port is enabled:
Sequencer client deletion In-flight OSS NOTEON
------------------------- -------------------
drain native port
clear native voice aliases
snd_opl3_oss_event_input()
refill shared voice array
drain OSS port
clear voice aliases again
free OSS channel set
client deletion returns
The per-port voice cleanup prevents the timer from dereferencing a freed
channel during that sequence, but a queued or running timer can still
outlive client deletion and the sequencer driver itself.
Shut the timer down synchronously after snd_seq_delete_kernel_client()
has drained both ports. No event can then start it again, and shutdown
waits for a callback already running and prevents callback self-rearming.
Do this outside voice_lock and sys_timer_lock, which the callback takes.
The probe initializes timer state before publishing ports on rebind.
Assisted-by: LLM
Signed-off-by: Cen Zhang <zzzccc427@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/pm-pmb-4552c4e605507d8d9b16-v9-70247b8436e10e26d324-3@gmail.com
Diffstat (limited to 'scripts/stackusage')
0 files changed, 0 insertions, 0 deletions
