diff options
| author | Manu Gautam <mgautam@codeaurora.org> | 2017-02-24 15:22:40 +0530 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2018-11-27 16:09:55 +0100 |
| commit | 513cef2c53c2b3846f6c571823412f514b6f66c7 (patch) | |
| tree | 91c79e2c53b67916729fbfea3150bf7d9571bbdc /sound/usb/usx2y/usx2yhwdeppcm.c | |
| parent | b32e2d51665e3b6af648dec474db214b6312d967 (diff) | |
usb: replace %p with %pK
Format specifier %p can leak kernel addresses while not valuing the
kptr_restrict system settings. When kptr_restrict is set to (1), kernel
pointers printed using the %pK format specifier will be replaced with 0's.
Debugging Note : &pK prints only Zeros as address. If you need actual
address information, write 0 to kptr_restrict.
echo 0 > /proc/sys/kernel/kptr_restrict
CRs-fixed: 1052849
Change-Id: I0e98145730380ea983fa8f46a28d15dd6c2c31df
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
Signed-off-by: Yasir Malik <ymalik@codeaurora.org>
Signed-off-by: Kevin F. Haggerty <haggertk@lineageos.org>
Diffstat (limited to 'sound/usb/usx2y/usx2yhwdeppcm.c')
| -rw-r--r-- | sound/usb/usx2y/usx2yhwdeppcm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/usb/usx2y/usx2yhwdeppcm.c b/sound/usb/usx2y/usx2yhwdeppcm.c index 814d0e887..7e1139063 100644 --- a/sound/usb/usx2y/usx2yhwdeppcm.c +++ b/sound/usb/usx2y/usx2yhwdeppcm.c @@ -359,7 +359,7 @@ static int snd_usX2Y_usbpcm_hw_free(struct snd_pcm_substream *substream) struct snd_usX2Y_substream *subs = runtime->private_data, *cap_subs2 = subs->usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE + 2]; mutex_lock(&subs->usX2Y->prepare_mutex); - snd_printdd("snd_usX2Y_usbpcm_hw_free(%p)\n", substream); + snd_printdd("snd_usX2Y_usbpcm_hw_free(%pK)\n", substream); if (SNDRV_PCM_STREAM_PLAYBACK == substream->stream) { struct snd_usX2Y_substream *cap_subs = subs->usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE]; @@ -485,7 +485,7 @@ static int snd_usX2Y_usbpcm_prepare(struct snd_pcm_substream *substream) struct usX2Ydev *usX2Y = subs->usX2Y; struct snd_usX2Y_substream *capsubs = subs->usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE]; int err = 0; - snd_printdd("snd_usX2Y_pcm_prepare(%p)\n", substream); + snd_printdd("snd_usX2Y_pcm_prepare(%pK)\n", substream); if (NULL == usX2Y->hwdep_pcm_shm) { if (NULL == (usX2Y->hwdep_pcm_shm = snd_malloc_pages(sizeof(struct snd_usX2Y_hwdep_pcm_shm), GFP_KERNEL))) |
