]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: pcm: oss: Place the plugin buffer overflow checks correctly (for 5.7)
authorTakashi Iwai <tiwai@suse.de>
Fri, 24 Apr 2020 19:38:43 +0000 (21:38 +0200)
committerTakashi Iwai <tiwai@suse.de>
Fri, 24 Apr 2020 19:39:09 +0000 (21:39 +0200)
commitbff782b064c8444c1ee77a49855eb60df5f7311d
tree106b0a7e091d072ef113ad3a9b5076ed4d3ca52b
parent87ef0c83ea7dceb4a5510b32cea7024e561e9d44
ALSA: pcm: oss: Place the plugin buffer overflow checks correctly (for 5.7)

[ This is again a forward-port of the fix applied for 5.6-base code
  (commit 4285de0725b1) to 5.7-base, hence neither Fixes nor
  Cc-to-stable tags are included here -- tiwai ]

The checks of the plugin buffer overflow in the previous fix by commit
  5028daa3ed6b ("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.

Link: https://lore.kernel.org/r/20200424193843.20397-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/oss/pcm_plugin.c