summaryrefslogtreecommitdiff
path: root/include/linux/raspberrypi
diff options
context:
space:
mode:
authorSinan Turunc <enscrpt@pm.me>2026-11-15 12:16:33 +0000
committerTakashi Iwai <tiwai@suse.de>2026-11-16 16:40:29 +0100
commitbd691dfae024059d79eae38230c883e52ce9842f (patch)
tree2e620e2634a509c80a8015bd0ab8b25de9640bea /include/linux/raspberrypi
parent9cda4ab0a5a7f19cd4611214905e08d5ed35421d (diff)
ALSA: usx2y: Count completions apart from the URB array length
usx2y_rate_set() allocates a snd_usx2y_urb_seq with len set to the number of URBs, and i_usx2y_04int() decrements len once per completed URB to know when all of them are done. Since len is also the __counted_by() bound of the urb[] array, every access to the array after the first completion is out of range for UBSAN, and the cleanup loop in usx2y_rate_set() trips it on every prepare: UBSAN: array-index-out-of-bounds in sound/usb/usx2y/usbusx2yaudio.c:694:18 index 0 is out of range for type 'urb *[*]' Count the completions in a separate field and leave len as the array length. Tested on 7.3-rc7 with CONFIG_UBSAN_BOUNDS and an emulated US-122 over USB/IP: before, the report appears on every prepare; after, a 30 s capture stream prepares and runs without it and the rate sequence still completes. Fixes: f5cc9cdfc96f ("ALSA: usx2y: Annotate struct snd_usx2y_urb_seq with __counted_by") Signed-off-by: Sinan Turunc <enscrpt@pm.me> Link: https://patch.msgid.link/20261115121602.151-1-enscrpt@pm.me Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/linux/raspberrypi')
0 files changed, 0 insertions, 0 deletions