diff options
| author | Runyu Xiao <runyu.xiao@seu.edu.cn> | 2026-09-29 22:17:26 +0800 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2026-09-29 16:26:34 +0200 |
| commit | 19b42c1fff7f220a6346c614d79ce1bda6d95b40 (patch) | |
| tree | 52fffc3425e0d3a0ffbaa9b68ebe455055c7a425 /tools/lib/python/kdoc | |
| parent | 025877a3833d12aff023ce9e89d75f4d6fd61ddb (diff) | |
ALSA: usb-audio: Protect Roland control activation
The USB MIDI driver changes the Roland MIDI Input Mode control's access
flags directly from the rawmidi open and close paths. These changes are
not protected by the ALSA control core and the corresponding notifications
can race with control access.
Use snd_ctl_activate_id() so that the control core updates the access flags
and sends the notification under its lock. Release the USB MIDI mutex
before calling it because the control write path holds controls_rwsem while
roland_load_put() takes the USB MIDI mutex.
Keep the state transition and alternate-setting change under the USB MIDI
mutex; rawmidi's open mutex serializes the enclosing open and close paths.
Fixes: 96f61d9ade82 ("sound: usb-audio: allow switching altsetting on Roland USB MIDI devices")
Cc: stable@vger.kernel.org
Assisted-by: LLM
Signed-off-by: Runyu Xiao <runyu.xiao@seu.edu.cn>
Link: https://patch.msgid.link/20260929141726.2166899-1-runyu.xiao@seu.edu.cn
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'tools/lib/python/kdoc')
0 files changed, 0 insertions, 0 deletions
