https://github.com/torvalds/linux
Revision c1839501fe3e67d98635f159dba8b170d08f6521 authored by Takashi Sakamoto on 25 July 2024, 15:56:40 UTC, committed by Takashi Sakamoto on 27 July 2024, 01:28:36 UTC
In a commit 1d717123bb1a ("ALSA: firewire-lib: Avoid
-Wflex-array-member-not-at-end warning"), DEFINE_FLEX() macro was used to
handle variable length of array for header field in struct fw_iso_packet
structure. The usage of macro has a side effect that the designated
initializer assigns the count of array to the given field. Therefore
CIP_HEADER_QUADLETS (=2) is assigned to struct fw_iso_packet.header,
while the original designated initializer assigns zero to all fields.

With CIP_NO_HEADER flag, the change causes invalid length of header in
isochronous packet for 1394 OHCI IT context. This bug affects all of
devices supported by ALSA fireface driver; RME Fireface 400, 800, UCX, UFX,
and 802.

This commit fixes the bug by replacing it with the alternative version of
macro which corresponds no initializer.

Cc: stable@vger.kernel.org
Fixes: 1d717123bb1a ("ALSA: firewire-lib: Avoid -Wflex-array-member-not-at-end warning")
Reported-by: Edmund Raile <edmund.raile@proton.me>
Closes: https://lore.kernel.org/r/rrufondjeynlkx2lniot26ablsltnynfaq2gnqvbiso7ds32il@qk4r6xps7jh2/
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20240725155640.128442-1-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
1 parent 00e3913
History
Tip revision: c1839501fe3e67d98635f159dba8b170d08f6521 authored by Takashi Sakamoto on 25 July 2024, 15:56:40 UTC
ALSA: firewire-lib: fix wrong value as length of header for CIP_NO_HEADER case
Tip revision: c183950
File Mode Size
Makefile -rw-r--r-- 505 bytes
advise.c -rw-r--r-- 2.3 KB
advise.h -rw-r--r-- 316 bytes
alloc_cache.h -rw-r--r-- 1.3 KB
cancel.c -rw-r--r-- 8.0 KB
cancel.h -rw-r--r-- 962 bytes
epoll.c -rw-r--r-- 1.3 KB
epoll.h -rw-r--r-- 213 bytes
fdinfo.c -rw-r--r-- 7.1 KB
fdinfo.h -rw-r--r-- 100 bytes
filetable.c -rw-r--r-- 3.9 KB
filetable.h -rw-r--r-- 2.2 KB
fs.c -rw-r--r-- 6.8 KB
fs.h -rw-r--r-- 929 bytes
futex.c -rw-r--r-- 9.3 KB
futex.h -rw-r--r-- 1.2 KB
io-wq.c -rw-r--r-- 32.7 KB
io-wq.h -rw-r--r-- 2.1 KB
io_uring.c -rw-r--r-- 100.9 KB
io_uring.h -rw-r--r-- 12.6 KB
kbuf.c -rw-r--r-- 20.3 KB
kbuf.h -rw-r--r-- 4.7 KB
memmap.c -rw-r--r-- 7.8 KB
memmap.h -rw-r--r-- 921 bytes
msg_ring.c -rw-r--r-- 7.4 KB
msg_ring.h -rw-r--r-- 226 bytes
napi.c -rw-r--r-- 7.8 KB
napi.h -rw-r--r-- 2.4 KB
net.c -rw-r--r-- 43.1 KB
net.h -rw-r--r-- 1.9 KB
nop.c -rw-r--r-- 961 bytes
nop.h -rw-r--r-- 168 bytes
notif.c -rw-r--r-- 3.2 KB
notif.h -rw-r--r-- 1.3 KB
opdef.c -rw-r--r-- 15.4 KB
opdef.h -rw-r--r-- 1.4 KB
openclose.c -rw-r--r-- 7.3 KB
openclose.h -rw-r--r-- 754 bytes
poll.c -rw-r--r-- 28.4 KB
poll.h -rw-r--r-- 1.2 KB
refs.h -rw-r--r-- 1.3 KB
register.c -rw-r--r-- 14.1 KB
register.h -rw-r--r-- 218 bytes
rsrc.c -rw-r--r-- 24.9 KB
rsrc.h -rw-r--r-- 3.6 KB
rw.c -rw-r--r-- 30.3 KB
rw.h -rw-r--r-- 1.2 KB
slist.h -rw-r--r-- 2.7 KB
splice.c -rw-r--r-- 2.9 KB
splice.h -rw-r--r-- 306 bytes
sqpoll.c -rw-r--r-- 12.0 KB
sqpoll.h -rw-r--r-- 848 bytes
statx.c -rw-r--r-- 1.6 KB
statx.h -rw-r--r-- 217 bytes
sync.c -rw-r--r-- 2.8 KB
sync.h -rw-r--r-- 460 bytes
tctx.c -rw-r--r-- 7.4 KB
tctx.h -rw-r--r-- 992 bytes
timeout.c -rw-r--r-- 17.8 KB
timeout.h -rw-r--r-- 1.2 KB
truncate.c -rw-r--r-- 1.0 KB
truncate.h -rw-r--r-- 180 bytes
uring_cmd.c -rw-r--r-- 9.4 KB
uring_cmd.h -rw-r--r-- 347 bytes
waitid.c -rw-r--r-- 9.1 KB
waitid.h -rw-r--r-- 484 bytes
xattr.c -rw-r--r-- 5.6 KB
xattr.h -rw-r--r-- 654 bytes

back to top