Patch "ALSA: pcm: Fix missing fixup call in compat hw_refine ioctl" has been added to the 6.5-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    ALSA: pcm: Fix missing fixup call in compat hw_refine ioctl

to the 6.5-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     alsa-pcm-fix-missing-fixup-call-in-compat-hw_refine-ioctl.patch
and it can be found in the queue-6.5 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 358040e3807754944dbddf948a23c6d914297ed7 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@xxxxxxx>
Date: Tue, 29 Aug 2023 15:43:44 +0200
Subject: ALSA: pcm: Fix missing fixup call in compat hw_refine ioctl

From: Takashi Iwai <tiwai@xxxxxxx>

commit 358040e3807754944dbddf948a23c6d914297ed7 upstream.

The update of rate_num/den and msbits were factored out to
fixup_unreferenced_params() function to be called explicitly after the
hw_refine or hw_params procedure.  It's called from
snd_pcm_hw_refine_user(), but it's forgotten in the PCM compat ioctl.
This ended up with the incomplete rate_num/den and msbits parameters
when 32bit compat ioctl is used.

This patch adds the missing call in snd_pcm_ioctl_hw_params_compat().

Reported-by: Meng_Cai@xxxxxxxxxxxxxx
Fixes: f9a076bff053 ("ALSA: pcm: calculate non-mask/non-interval parameters always when possible")
Reviewed-by: Takashi Sakamoto <o-takashi@xxxxxxxxxxxxx>
Reviewed-by: Jaroslav Kysela <perex@xxxxxxxx>
Cc: <stable@xxxxxxxxxxxxxxx>
Link: https://lore.kernel.org/r/20230829134344.31588-1-tiwai@xxxxxxx
Signed-off-by: Takashi Iwai <tiwai@xxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 sound/core/pcm_compat.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

--- a/sound/core/pcm_compat.c
+++ b/sound/core/pcm_compat.c
@@ -253,10 +253,14 @@ static int snd_pcm_ioctl_hw_params_compa
 		goto error;
 	}
 
-	if (refine)
+	if (refine) {
 		err = snd_pcm_hw_refine(substream, data);
-	else
+		if (err < 0)
+			goto error;
+		err = fixup_unreferenced_params(substream, data);
+	} else {
 		err = snd_pcm_hw_params(substream, data);
+	}
 	if (err < 0)
 		goto error;
 	if (copy_to_user(data32, data, sizeof(*data32)) ||


Patches currently in stable-queue which might be from tiwai@xxxxxxx are

queue-6.5/alsa-ump-fix-wformat-truncation-warnings.patch
queue-6.5/alsa-ump-fill-group-names-for-legacy-rawmidi-substre.patch
queue-6.5/alsa-ac97-fix-possible-error-value-of-rac97.patch
queue-6.5/alsa-usb-audio-attach-legacy-rawmidi-after-probing-a.patch
queue-6.5/um-fix-hostaudio-build-errors.patch
queue-6.5/alsa-pcm-fix-missing-fixup-call-in-compat-hw_refine-ioctl.patch
queue-6.5/wifi-rtw89-fix-loading-of-compressed-firmware.patch
queue-6.5/alsa-ump-don-t-create-unused-substreams-for-static-b.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux