All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ALSA: fireworks: fix wrong return count shorter than expected by 4 bytes
@ 2022-04-24 10:24 ` Takashi Sakamoto
  0 siblings, 0 replies; 4+ messages in thread
From: Takashi Sakamoto @ 2022-04-24 10:24 UTC (permalink / raw)
  To: tiwai; +Cc: clemens, alsa-devel, stable

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>
---
 sound/firewire/fireworks/fireworks_hwdep.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/firewire/fireworks/fireworks_hwdep.c b/sound/firewire/fireworks/fireworks_hwdep.c
index 626c0c34b0b6..3a53914277d3 100644
--- a/sound/firewire/fireworks/fireworks_hwdep.c
+++ b/sound/firewire/fireworks/fireworks_hwdep.c
@@ -34,6 +34,7 @@ hwdep_read_resp_buf(struct snd_efw *efw, char __user *buf, long remained,
 	type = SNDRV_FIREWIRE_EVENT_EFW_RESPONSE;
 	if (copy_to_user(buf, &type, sizeof(type)))
 		return -EFAULT;
+	count += sizeof(type);
 	remained -= sizeof(type);
 	buf += sizeof(type);
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] ALSA: fireworks: fix wrong return count shorter than expected by 4 bytes
@ 2022-04-24 10:24 ` Takashi Sakamoto
  0 siblings, 0 replies; 4+ messages in thread
From: Takashi Sakamoto @ 2022-04-24 10:24 UTC (permalink / raw)
  To: tiwai; +Cc: alsa-devel, clemens, stable

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>
---
 sound/firewire/fireworks/fireworks_hwdep.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/firewire/fireworks/fireworks_hwdep.c b/sound/firewire/fireworks/fireworks_hwdep.c
index 626c0c34b0b6..3a53914277d3 100644
--- a/sound/firewire/fireworks/fireworks_hwdep.c
+++ b/sound/firewire/fireworks/fireworks_hwdep.c
@@ -34,6 +34,7 @@ hwdep_read_resp_buf(struct snd_efw *efw, char __user *buf, long remained,
 	type = SNDRV_FIREWIRE_EVENT_EFW_RESPONSE;
 	if (copy_to_user(buf, &type, sizeof(type)))
 		return -EFAULT;
+	count += sizeof(type);
 	remained -= sizeof(type);
 	buf += sizeof(type);
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] ALSA: fireworks: fix wrong return count shorter than expected by 4 bytes
  2022-04-24 10:24 ` Takashi Sakamoto
@ 2022-04-25  6:04   ` Takashi Iwai
  -1 siblings, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2022-04-25  6:04 UTC (permalink / raw)
  To: Takashi Sakamoto; +Cc: clemens, alsa-devel, stable

On Sun, 24 Apr 2022 12:24:28 +0200,
Takashi Sakamoto wrote:
> 
> 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>

Thanks, applied.


Takashi

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ALSA: fireworks: fix wrong return count shorter than expected by 4 bytes
@ 2022-04-25  6:04   ` Takashi Iwai
  0 siblings, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2022-04-25  6:04 UTC (permalink / raw)
  To: Takashi Sakamoto; +Cc: alsa-devel, clemens, stable

On Sun, 24 Apr 2022 12:24:28 +0200,
Takashi Sakamoto wrote:
> 
> 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>

Thanks, applied.


Takashi

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-04-25  6:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-24 10:24 [PATCH] ALSA: fireworks: fix wrong return count shorter than expected by 4 bytes Takashi Sakamoto
2022-04-24 10:24 ` Takashi Sakamoto
2022-04-25  6:04 ` Takashi Iwai
2022-04-25  6:04   ` Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.