This is a note to let you know that I've just added the patch titled ALSA: pcm: oss: Handle missing errors in snd_pcm_oss_change_params*() to the 5.10-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-oss-handle-missing-errors-in-snd_pcm_oss_change_params.patch and it can be found in the queue-5.10 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 6665bb30a6b1a4a853d52557c05482ee50e71391 Mon Sep 17 00:00:00 2001 From: Takashi Iwai <tiwai@xxxxxxx> Date: Wed, 1 Dec 2021 08:36:06 +0100 Subject: ALSA: pcm: oss: Handle missing errors in snd_pcm_oss_change_params*() From: Takashi Iwai <tiwai@xxxxxxx> commit 6665bb30a6b1a4a853d52557c05482ee50e71391 upstream. A couple of calls in snd_pcm_oss_change_params_locked() ignore the possible errors. Catch those errors and abort the operation for avoiding further problems. Cc: <stable@xxxxxxxxxxxxxxx> Link: https://lore.kernel.org/r/20211201073606.11660-4-tiwai@xxxxxxx Signed-off-by: Takashi Iwai <tiwai@xxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- sound/core/oss/pcm_oss.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) --- a/sound/core/oss/pcm_oss.c +++ b/sound/core/oss/pcm_oss.c @@ -884,8 +884,15 @@ static int snd_pcm_oss_change_params_loc err = -EINVAL; goto failure; } - choose_rate(substream, sparams, runtime->oss.rate); - snd_pcm_hw_param_near(substream, sparams, SNDRV_PCM_HW_PARAM_CHANNELS, runtime->oss.channels, NULL); + + err = choose_rate(substream, sparams, runtime->oss.rate); + if (err < 0) + goto failure; + err = snd_pcm_hw_param_near(substream, sparams, + SNDRV_PCM_HW_PARAM_CHANNELS, + runtime->oss.channels, NULL); + if (err < 0) + goto failure; format = snd_pcm_oss_format_from(runtime->oss.format); Patches currently in stable-queue which might be from tiwai@xxxxxxx are queue-5.10/alsa-hda-realtek-fix-quirk-for-tongfang-phxtxx1.patch queue-5.10/alsa-hda-realtek-add-headset-mic-support-for-lenovo-alc897-platform.patch queue-5.10/alsa-pcm-oss-handle-missing-errors-in-snd_pcm_oss_change_params.patch queue-5.10/alsa-ctl-fix-copy-of-updated-id-with-element-read-write.patch queue-5.10/alsa-pcm-oss-limit-the-period-size-to-16mb.patch queue-5.10/alsa-pcm-oss-fix-negative-period-buffer-sizes.patch