Patch "ALSA: PCM: Allow resume only for suspended streams" has been added to the 6.1-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: Allow resume only for suspended streams

to the 6.1-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-allow-resume-only-for-suspended-streams.patch
and it can be found in the queue-6.1 subdirectory.

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



commit 47367ab022a5293963b8305a183407722e27f6cf
Author: Takashi Iwai <tiwai@xxxxxxx>
Date:   Mon Jun 24 14:54:34 2024 +0200

    ALSA: PCM: Allow resume only for suspended streams
    
    [ Upstream commit 1225675ca74c746f09211528588e83b3def1ff6a ]
    
    snd_pcm_resume() should bail out if the stream isn't in a suspended
    state.  Otherwise it'd allow doubly resume.
    
    Link: https://patch.msgid.link/20240624125443.27808-1-tiwai@xxxxxxx
    Signed-off-by: Takashi Iwai <tiwai@xxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index 9238abbfb2d62..2b73518e5e314 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -1781,6 +1781,8 @@ static int snd_pcm_pre_resume(struct snd_pcm_substream *substream,
 			      snd_pcm_state_t state)
 {
 	struct snd_pcm_runtime *runtime = substream->runtime;
+	if (runtime->state != SNDRV_PCM_STATE_SUSPENDED)
+		return -EBADFD;
 	if (!(runtime->info & SNDRV_PCM_INFO_RESUME))
 		return -ENOSYS;
 	runtime->trigger_master = substream;




[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