Patch "ALSA: ump: Don't open legacy substream for an inactive group" has been added to the 6.6-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: ump: Don't open legacy substream for an inactive group

to the 6.6-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-ump-don-t-open-legacy-substream-for-an-inactive.patch
and it can be found in the queue-6.6 subdirectory.

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



commit d430bff8d1ad1c55b9a166d2f135161b1856a410
Author: Takashi Iwai <tiwai@xxxxxxx>
Date:   Fri Nov 29 10:45:42 2024 +0100

    ALSA: ump: Don't open legacy substream for an inactive group
    
    [ Upstream commit 3978d53df7236f0a517c2abeb43ddf6ac162cdd8 ]
    
    When a UMP Group is inactive, we shouldn't allow users to access it
    via the legacy MIDI access.  Add the group active flag check and
    return -ENODEV if it's inactive.
    
    Link: https://patch.msgid.link/20241129094546.32119-2-tiwai@xxxxxxx
    Signed-off-by: Takashi Iwai <tiwai@xxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/sound/core/ump.c b/sound/core/ump.c
index ada2625ce78f..5a4a7d0b7cca 100644
--- a/sound/core/ump.c
+++ b/sound/core/ump.c
@@ -1081,6 +1081,8 @@ static int snd_ump_legacy_open(struct snd_rawmidi_substream *substream)
 	guard(mutex)(&ump->open_mutex);
 	if (ump->legacy_substreams[dir][group])
 		return -EBUSY;
+	if (!ump->groups[group].active)
+		return -ENODEV;
 	if (dir == SNDRV_RAWMIDI_STREAM_OUTPUT) {
 		if (!ump->legacy_out_opens) {
 			err = snd_rawmidi_kernel_open(&ump->core, 0,




[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