OSDN Git Service

msm: camera: fix Information leak
authorManish Poddar <mpoddar@codeaurora.org>
Fri, 9 Dec 2016 05:55:31 +0000 (11:25 +0530)
committerGerrit - the friendly Code Review server <code-review@localhost>
Mon, 16 Jan 2017 05:43:44 +0000 (21:43 -0800)
In msm_buf_mngr_sd_shutdown bufs is a pointer defined
in kernel, and it is printed to userspace using %lx.
changed it to %pK.

Change-Id: Ic2cb1a2ff109364ac2da1bbb3253a2253a0c6be9
Signed-off-by: Manish Poddar <mpoddar@codeaurora.org>
drivers/media/platform/msm/camera_v2/msm_buf_mgr/msm_generic_buf_mgr.c

index ac9a4b2..0c73eac 100644 (file)
@@ -299,8 +299,8 @@ static void msm_buf_mngr_sd_shutdown(struct msm_buf_mngr_device *dev,
        if (!list_empty(&dev->buf_qhead)) {
                list_for_each_entry_safe(bufs,
                        save, &dev->buf_qhead, entry) {
-                       pr_info("%s: Delete invalid bufs =%lx, session_id=%u, bufs->ses_id=%d, str_id=%d, idx=%d\n",
-                               __func__, (unsigned long)bufs, session->session,
+                       pr_info("%s: Delete invalid bufs =%pK, session_id=%u, bufs->ses_id=%d, str_id=%d, idx=%d\n",
+                               __func__, (void *)bufs, session->session,
                                bufs->session_id, bufs->stream_id,
                                bufs->vb2_v4l2_buf->vb2_buf.index);
                        if (session->session == bufs->session_id) {