Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
fork

Configure Feed

Select the types of activity you want to include in your feed.

ALSA: fireworks: fix wrong return count shorter than expected by 4 bytes

ALSA fireworks driver has a bug in its initial state to return count
shorter than expected by 4 bytes to userspace applications when handling
response frame for Echo Audio Fireworks transaction. It's due to missing
addition of the size for the type of event in ALSA firewire stack.

Fixes: 555e8a8f7f14 ("ALSA: fireworks: Add command/response functionality into hwdep interface")
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20220424102428.21109-1-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>

authored by

Takashi Sakamoto and committed by
Takashi Iwai
eb9d84b0 3b79954f

+1
+1
sound/firewire/fireworks/fireworks_hwdep.c
··· 34 34 type = SNDRV_FIREWIRE_EVENT_EFW_RESPONSE; 35 35 if (copy_to_user(buf, &type, sizeof(type))) 36 36 return -EFAULT; 37 + count += sizeof(type); 37 38 remained -= sizeof(type); 38 39 buf += sizeof(type); 39 40