]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ALSA: pcm: Fix missing fixup call in compat hw_refine ioctl
authorTakashi Iwai <tiwai@suse.de>
Tue, 29 Aug 2023 13:43:44 +0000 (15:43 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Sep 2023 10:22:50 +0000 (12:22 +0200)
commitd479c841b18dd13a7e679cdaa564e82d003361c9
tree4df953ba39ec38b531c601b2cccf4dcfc14d2349
parent111bafa210ae546bee7644be730c42df9c35b66e
ALSA: pcm: Fix missing fixup call in compat hw_refine ioctl

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@novatek.com.cn
Fixes: f9a076bff053 ("ALSA: pcm: calculate non-mask/non-interval parameters always when possible")
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20230829134344.31588-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/core/pcm_compat.c