Drop "ALSA: pcm: oss: Place the plugin buffer overflow checks correctly"
This commit is contained in:
parent
c4c46fdfc9
commit
7cbcb7e493
|
@ -149,7 +149,7 @@ linux (4.19.121-1) UNRELEASED; urgency=medium
|
||||||
- ALSA: hda/realtek - Two front mics on a Lenovo ThinkCenter
|
- ALSA: hda/realtek - Two front mics on a Lenovo ThinkCenter
|
||||||
- ALSA: usb-audio: Correct a typo of NuPrime DAC-10 USB ID
|
- ALSA: usb-audio: Correct a typo of NuPrime DAC-10 USB ID
|
||||||
- ALSA: hda/hdmi: fix without unlocked before return
|
- ALSA: hda/hdmi: fix without unlocked before return
|
||||||
- ALSA: pcm: oss: Place the plugin buffer overflow checks correctly
|
- ALSA: pcm: oss: Place the plugin buffer overflow checks correctly (Closes: #960493)
|
||||||
- PM: ACPI: Output correct message on target power state
|
- PM: ACPI: Output correct message on target power state
|
||||||
- PM: hibernate: Freeze kernel threads in software_resume()
|
- PM: hibernate: Freeze kernel threads in software_resume()
|
||||||
- dm verity fec: fix hash block number in verity_fec_decode
|
- dm verity fec: fix hash block number in verity_fec_decode
|
||||||
|
@ -180,8 +180,6 @@ linux (4.19.121-1) UNRELEASED; urgency=medium
|
||||||
- mmc: meson-mx-sdio: remove the broken ->card_busy() op
|
- mmc: meson-mx-sdio: remove the broken ->card_busy() op
|
||||||
|
|
||||||
[ Salvatore Bonaccorso ]
|
[ Salvatore Bonaccorso ]
|
||||||
* ALSA: pcm: oss: Place the plugin buffer overflow checks correctly
|
|
||||||
(Closes: #960493)
|
|
||||||
* [rt] Add new signing key for Tom Zanussi
|
* [rt] Add new signing key for Tom Zanussi
|
||||||
* apparmor: don't try to replace stale label in ptraceme check
|
* apparmor: don't try to replace stale label in ptraceme check
|
||||||
(Closes: #963493)
|
(Closes: #963493)
|
||||||
|
|
|
@ -1,92 +0,0 @@
|
||||||
From: Takashi Iwai <tiwai@suse.de>
|
|
||||||
Date: Fri, 24 Apr 2020 21:33:50 +0200
|
|
||||||
Subject: ALSA: pcm: oss: Place the plugin buffer overflow checks correctly
|
|
||||||
Origin: https://git.kernel.org/linus/4285de0725b1bf73608abbcd35ad7fd3ddc0b61e
|
|
||||||
Bug-Debian: https://bugs.debian.org/960493
|
|
||||||
|
|
||||||
The checks of the plugin buffer overflow in the previous fix by commit
|
|
||||||
f2ecf903ef06 ("ALSA: pcm: oss: Avoid plugin buffer overflow")
|
|
||||||
are put in the wrong places mistakenly, which leads to the expected
|
|
||||||
(repeated) sound when the rate plugin is involved. Fix in the right
|
|
||||||
places.
|
|
||||||
|
|
||||||
Also, at those right places, the zero check is needed for the
|
|
||||||
termination node, so added there as well, and let's get it done,
|
|
||||||
finally.
|
|
||||||
|
|
||||||
Fixes: f2ecf903ef06 ("ALSA: pcm: oss: Avoid plugin buffer overflow")
|
|
||||||
Cc: <stable@vger.kernel.org>
|
|
||||||
Link: https://lore.kernel.org/r/20200424193350.19678-1-tiwai@suse.de
|
|
||||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
||||||
---
|
|
||||||
sound/core/oss/pcm_plugin.c | 20 ++++++++++++--------
|
|
||||||
1 file changed, 12 insertions(+), 8 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/sound/core/oss/pcm_plugin.c b/sound/core/oss/pcm_plugin.c
|
|
||||||
index 50c35ecc8953..d1760f86773c 100644
|
|
||||||
--- a/sound/core/oss/pcm_plugin.c
|
|
||||||
+++ b/sound/core/oss/pcm_plugin.c
|
|
||||||
@@ -211,21 +211,23 @@ static snd_pcm_sframes_t plug_client_size(struct snd_pcm_substream *plug,
|
|
||||||
if (stream == SNDRV_PCM_STREAM_PLAYBACK) {
|
|
||||||
plugin = snd_pcm_plug_last(plug);
|
|
||||||
while (plugin && drv_frames > 0) {
|
|
||||||
- if (check_size && drv_frames > plugin->buf_frames)
|
|
||||||
- drv_frames = plugin->buf_frames;
|
|
||||||
plugin_prev = plugin->prev;
|
|
||||||
if (plugin->src_frames)
|
|
||||||
drv_frames = plugin->src_frames(plugin, drv_frames);
|
|
||||||
+ if (check_size && plugin->buf_frames &&
|
|
||||||
+ drv_frames > plugin->buf_frames)
|
|
||||||
+ drv_frames = plugin->buf_frames;
|
|
||||||
plugin = plugin_prev;
|
|
||||||
}
|
|
||||||
} else if (stream == SNDRV_PCM_STREAM_CAPTURE) {
|
|
||||||
plugin = snd_pcm_plug_first(plug);
|
|
||||||
while (plugin && drv_frames > 0) {
|
|
||||||
plugin_next = plugin->next;
|
|
||||||
+ if (check_size && plugin->buf_frames &&
|
|
||||||
+ drv_frames > plugin->buf_frames)
|
|
||||||
+ drv_frames = plugin->buf_frames;
|
|
||||||
if (plugin->dst_frames)
|
|
||||||
drv_frames = plugin->dst_frames(plugin, drv_frames);
|
|
||||||
- if (check_size && drv_frames > plugin->buf_frames)
|
|
||||||
- drv_frames = plugin->buf_frames;
|
|
||||||
plugin = plugin_next;
|
|
||||||
}
|
|
||||||
} else
|
|
||||||
@@ -251,26 +253,28 @@ static snd_pcm_sframes_t plug_slave_size(struct snd_pcm_substream *plug,
|
|
||||||
plugin = snd_pcm_plug_first(plug);
|
|
||||||
while (plugin && frames > 0) {
|
|
||||||
plugin_next = plugin->next;
|
|
||||||
+ if (check_size && plugin->buf_frames &&
|
|
||||||
+ frames > plugin->buf_frames)
|
|
||||||
+ frames = plugin->buf_frames;
|
|
||||||
if (plugin->dst_frames) {
|
|
||||||
frames = plugin->dst_frames(plugin, frames);
|
|
||||||
if (frames < 0)
|
|
||||||
return frames;
|
|
||||||
}
|
|
||||||
- if (check_size && frames > plugin->buf_frames)
|
|
||||||
- frames = plugin->buf_frames;
|
|
||||||
plugin = plugin_next;
|
|
||||||
}
|
|
||||||
} else if (stream == SNDRV_PCM_STREAM_CAPTURE) {
|
|
||||||
plugin = snd_pcm_plug_last(plug);
|
|
||||||
while (plugin) {
|
|
||||||
- if (check_size && frames > plugin->buf_frames)
|
|
||||||
- frames = plugin->buf_frames;
|
|
||||||
plugin_prev = plugin->prev;
|
|
||||||
if (plugin->src_frames) {
|
|
||||||
frames = plugin->src_frames(plugin, frames);
|
|
||||||
if (frames < 0)
|
|
||||||
return frames;
|
|
||||||
}
|
|
||||||
+ if (check_size && plugin->buf_frames &&
|
|
||||||
+ frames > plugin->buf_frames)
|
|
||||||
+ frames = plugin->buf_frames;
|
|
||||||
plugin = plugin_prev;
|
|
||||||
}
|
|
||||||
} else
|
|
||||||
--
|
|
||||||
2.27.0
|
|
||||||
|
|
|
@ -100,7 +100,6 @@ bugfix/all/kbuild-include-addtree-remove-quotes-before-matching-path.patch
|
||||||
debian/revert-objtool-fix-config_stack_validation-y-warning.patch
|
debian/revert-objtool-fix-config_stack_validation-y-warning.patch
|
||||||
bugfix/all/mt76-use-the-correct-hweight8-function.patch
|
bugfix/all/mt76-use-the-correct-hweight8-function.patch
|
||||||
bugfix/all/rtc-s35390a-set-uie_unsupported.patch
|
bugfix/all/rtc-s35390a-set-uie_unsupported.patch
|
||||||
bugfix/all/ALSA-pcm-oss-Place-the-plugin-buffer-overflow-checks.patch
|
|
||||||
bugfix/all/apparmor-don-t-try-to-replace-stale-label-in-ptracem.patch
|
bugfix/all/apparmor-don-t-try-to-replace-stale-label-in-ptracem.patch
|
||||||
bugfix/all/nfsd-apply-umask-on-fs-without-ACL-support.patch
|
bugfix/all/nfsd-apply-umask-on-fs-without-ACL-support.patch
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue