summaryrefslogtreecommitdiff
path: root/tools/lib/python/abi
diff options
context:
space:
mode:
authorNiko Huuskonen <niko.huuskonen.00@gmail.com>2026-09-27 03:35:29 +0300
committerTakashi Iwai <tiwai@suse.de>2026-09-28 18:11:36 +0200
commita718fd03e1e00211cf4662f5ab82d33f4c18e2a7 (patch)
tree41ba412f8eb98ca3dbeee3cc5eb7421f91a16d63 /tools/lib/python/abi
parent72107104d4f522405c9dfdfbaeb230e371c295ee (diff)
ALSA: caiaq: Serialize access to the EP1 command buffer
snd_usb_caiaq_send_command() and snd_usb_caiaq_send_command_bank() copy the command into cdev->ep1_out_buf and send it with a synchronous bulk transfer. Nothing serializes their callers. An ALSA control write, which sets the LEDs on the Kore controllers and several other devices, can run at the same time as a PCM prepare, which sends the audio parameters through the same buffer. One caller can then overwrite the buffer while the transfer of the other is still in flight, and the device receives a mix of both commands. Protect the buffer with a mutex. All callers run in process context and already sleep in usb_bulk_msg(). The problem was found by code review while adding another user of the buffer, the Kore LCD support later in this series. It has not been observed or reproduced. Fixes: 8e3cd08ed8e5 ("[ALSA] caiaq - add control API and more input features") Assisted-by: LLM Signed-off-by: Niko Huuskonen <niko.huuskonen.00@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20260927003532.289468-2-niko.huuskonen.00@gmail.com
Diffstat (limited to 'tools/lib/python/abi')
0 files changed, 0 insertions, 0 deletions