* FAILED: patch "[PATCH] ALSA: rawmidi: Return the error from" failed to apply to 6.1-stable tree
@ 2026-09-09 9:47 gregkh
2026-09-11 0:15 ` [PATCH 6.1.y] ALSA: rawmidi: Return the error from snd_rawmidi_input_params() Sasha Levin
0 siblings, 1 reply; 2+ messages in thread
From: gregkh @ 2026-09-09 9:47 UTC (permalink / raw)
To: sammiee5311, tiwai; +Cc: stable
The patch below does not apply to the 6.1-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.1.y
git checkout FETCH_HEAD
git cherry-pick -x f4a23e17d84fd2a152d9e12369761934e1af0ee8
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable@vger.kernel.org>' --in-reply-to '2026090938-festival-dropbox-c7df@gregkh' --subject-prefix 'PATCH 6.1.y' 'HEAD^..'
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From f4a23e17d84fd2a152d9e12369761934e1af0ee8 Mon Sep 17 00:00:00 2001
From: HyeongJun An <sammiee5311@gmail.com>
Date: Wed, 2 Sep 2026 21:50:58 +0900
Subject: [PATCH] ALSA: rawmidi: Return the error from
snd_rawmidi_input_params()
The snd_rawmidi_input_params() computes err for the three invalid mode
combinations and for resize_runtime_buffer(), applies the new framing
and clock type only when err is zero, and then returns 0 anyway. A
caller that asked for parameters the kernel rejected is told the change
succeeded, and the substream keeps its old buffer.
The open_mutex conversion turned the early returns into assignments.
It handled the output sibling correctly, which still returns err, and
left this one behind.
Fixes: 94b98194b62e ("ALSA: rawmidi: Take open_mutex around parameter changes")
Cc: stable@vger.kernel.org
Assisted-by: Claude:claude-opus-5
Signed-off-by: HyeongJun An <sammiee5311@gmail.com>
Link: https://patch.msgid.link/20260902125058.19499-1-sammiee5311@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
diff --git a/sound/core/rawmidi.c b/sound/core/rawmidi.c
index 34b4c7d6dbe6..2617bb5b4faf 100644
--- a/sound/core/rawmidi.c
+++ b/sound/core/rawmidi.c
@@ -785,7 +785,7 @@ int snd_rawmidi_input_params(struct snd_rawmidi_substream *substream,
substream->framing = framing;
substream->clock_type = clock_type;
}
- return 0;
+ return err;
}
EXPORT_SYMBOL(snd_rawmidi_input_params);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 6.1.y] ALSA: rawmidi: Return the error from snd_rawmidi_input_params()
2026-09-09 9:47 FAILED: patch "[PATCH] ALSA: rawmidi: Return the error from" failed to apply to 6.1-stable tree gregkh
@ 2026-09-11 0:15 ` Sasha Levin
0 siblings, 0 replies; 2+ messages in thread
From: Sasha Levin @ 2026-09-11 0:15 UTC (permalink / raw)
To: stable; +Cc: HyeongJun An, Takashi Iwai, Sasha Levin
From: HyeongJun An <sammiee5311@gmail.com>
[ Upstream commit f4a23e17d84fd2a152d9e12369761934e1af0ee8 ]
The snd_rawmidi_input_params() computes err for the three invalid mode
combinations and for resize_runtime_buffer(), applies the new framing
and clock type only when err is zero, and then returns 0 anyway. A
caller that asked for parameters the kernel rejected is told the change
succeeded, and the substream keeps its old buffer.
The open_mutex conversion turned the early returns into assignments.
It handled the output sibling correctly, which still returns err, and
left this one behind.
Fixes: 94b98194b62e ("ALSA: rawmidi: Take open_mutex around parameter changes")
Cc: stable@vger.kernel.org
Assisted-by: Claude:claude-opus-5
Signed-off-by: HyeongJun An <sammiee5311@gmail.com>
Link: https://patch.msgid.link/20260902125058.19499-1-sammiee5311@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/core/rawmidi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/core/rawmidi.c b/sound/core/rawmidi.c
index d8edb60550724..a1c4e280e7894 100644
--- a/sound/core/rawmidi.c
+++ b/sound/core/rawmidi.c
@@ -793,7 +793,7 @@ int snd_rawmidi_input_params(struct snd_rawmidi_substream *substream,
substream->clock_type = clock_type;
}
mutex_unlock(&substream->rmidi->open_mutex);
- return 0;
+ return err;
}
EXPORT_SYMBOL(snd_rawmidi_input_params);
--
2.53.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-11 0:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-09 9:47 FAILED: patch "[PATCH] ALSA: rawmidi: Return the error from" failed to apply to 6.1-stable tree gregkh
2026-09-11 0:15 ` [PATCH 6.1.y] ALSA: rawmidi: Return the error from snd_rawmidi_input_params() Sasha Levin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox