aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sound/core
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-12-18 20:05:39 +0100
committerTakashi Iwai <tiwai@suse.de>2019-12-18 20:07:43 +0100
commita032ff0e8065668e672eb2e223e265b7808f35a3 (patch)
tree90c43579c425f8789fc9cec99c8ea39ba6c26874 /sound/core
parentALSA: usx2y: Adjust indentation in snd_usX2Y_hwdep_dsp_status (diff)
parentALSA: usb-audio: set the interface format after resume on Dell WD19 (diff)
downloadwireguard-linux-a032ff0e8065668e672eb2e223e265b7808f35a3.tar.xz
wireguard-linux-a032ff0e8065668e672eb2e223e265b7808f35a3.zip
Merge branch 'for-linus' into for-next
Taking the 5.5 devel branch back into the main devel branch. A USB-audio fix needs to be adjusted to adapt the changes that have been formerly applied for stop_sync. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core')
-rw-r--r--sound/core/pcm_native.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index 5a1245509eac..c375c41496f8 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -740,6 +740,10 @@ static int snd_pcm_hw_params(struct snd_pcm_substream *substream,
while (runtime->boundary * 2 <= LONG_MAX - runtime->buffer_size)
runtime->boundary *= 2;
+ /* clear the buffer for avoiding possible kernel info leaks */
+ if (runtime->dma_area && !substream->ops->copy_user)
+ memset(runtime->dma_area, 0, runtime->dma_bytes);
+
snd_pcm_timer_resolution_change(substream);
snd_pcm_set_state(substream, SNDRV_PCM_STATE_SETUP);