Merge "msm: camera: Prevent info leak in kernel driver."

This commit is contained in:
Linux Build Service Account 2017-05-31 18:44:47 -07:00 committed by Gerrit - the friendly Code Review server
commit b4dca19c78
1 changed files with 8 additions and 7 deletions

View File

@ -213,8 +213,8 @@ static int msm_isp_prepare_isp_buf(struct msm_isp_buf_mgr *buf_mgr,
}
mapped_info->paddr += accu_length;
accu_length += qbuf_buf->planes[i].length;
CDBG("%s: plane: %d addr:%lu\n",
__func__, i, (unsigned long)mapped_info->paddr);
CDBG("%s: plane: %d addr:%pK\n",
__func__, i, (void *)mapped_info->paddr);
}
buf_info->num_planes = qbuf_buf->num_planes;
@ -280,8 +280,8 @@ static int msm_isp_map_buf(struct msm_isp_buf_mgr *buf_mgr,
pr_err_ratelimited("%s: cannot map address", __func__);
goto smmu_map_error;
}
CDBG("%s: addr:%lu\n",
__func__, (unsigned long)mapped_info->paddr);
CDBG("%s: addr:%pK\n",
__func__, (void *)mapped_info->paddr);
return rc;
smmu_map_error:
@ -1415,7 +1415,8 @@ static int msm_isp_buf_mgr_debug(struct msm_isp_buf_mgr *buf_mgr)
struct msm_isp_buffer *bufs = NULL;
uint32_t i = 0, j = 0, k = 0, rc = 0;
char *print_buf = NULL, temp_buf[100];
uint32_t start_addr = 0, end_addr = 0, print_buf_size = 2000;
uint32_t print_buf_size = 2000;
unsigned long start_addr = 0, end_addr = 0;
if (!buf_mgr) {
pr_err_ratelimited("%s: %d] NULL buf_mgr\n",
__func__, __LINE__);
@ -1450,8 +1451,8 @@ static int msm_isp_buf_mgr_debug(struct msm_isp_buf_mgr *buf_mgr)
end_addr = bufs->mapped_info[k].paddr +
bufs->mapped_info[k].len;
snprintf(temp_buf, sizeof(temp_buf),
" buf %d plane %d start_addr %x end_addr %x\n",
j, k, start_addr, end_addr);
" buf %d plane %d start_addr %pK end_addr %pK\n",
j, k, (void *)start_addr, (void *)end_addr);
strlcat(print_buf, temp_buf,
print_buf_size);
}