diff options
author | Takashi Iwai <tiwai@suse.de> | 2019-12-18 20:05:39 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2019-12-18 20:07:43 +0100 |
commit | a032ff0e8065668e672eb2e223e265b7808f35a3 (patch) | |
tree | 90c43579c425f8789fc9cec99c8ea39ba6c26874 /sound/core/pcm_native.c | |
parent | df4654bd6e42125d9b85ce3a26eaca2935290b98 (diff) | |
parent | 92adc96f8eecd9522a907c197cc3d62e405539fe (diff) | |
download | linux-a032ff0e8065668e672eb2e223e265b7808f35a3.tar.bz2 |
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/pcm_native.c')
-rw-r--r-- | sound/core/pcm_native.c | 4 |
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); |