• R/O
  • HTTP
  • SSH
  • HTTPS

kernel_xiaomi_msm8998: 提交

Mirror: https://github.com/0ranko0P/kernel_xiaomi_msm8998/


Commit MetaInfo

修订版d690caf517f896a0576fa088f06d69f07c132211 (tree)
时间2020-02-18 14:17:12
作者0ranko0P <ranko0p@outl...>
Commiter0ranko0P

Log Message

Revert "Revert "ALSA: pcm: Avoid possible info leaks from PCM stream buffers""

This reverts commit 19028bc7c1a40c12f0db5635dcbafd17c196a3eb.

更改概述

差异

--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -587,6 +587,10 @@ static int snd_pcm_hw_params(struct snd_pcm_substream *substream,
587587 LONG_MAX - runtime->buffer_size)
588588 runtime->boundary *= 2;
589589
590+ /* clear the buffer for avoiding possible kernel info leaks */
591+ if (runtime->dma_area)
592+ memset(runtime->dma_area, 0, runtime->dma_bytes);
593+
590594 snd_pcm_timer_resolution_change(substream);
591595 snd_pcm_set_state(substream, SNDRV_PCM_STATE_SETUP);
592596
Show on old repository browser