Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 377d77ee authored by Trishansh Bhardwaj's avatar Trishansh Bhardwaj Committed by Gerrit - the friendly Code Review server
Browse files

msm: camera: Change %p into %pK



Prevents kernel info leak by changing %p into %pK

CRs-Fixed: 1052835
Change-Id: Iad411dbba05326aa2bce82aff5e8140fd0a31a08
Signed-off-by: default avatarTrishansh Bhardwaj <tbhardwa@codeaurora.org>
parent 758693b4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -460,7 +460,7 @@ int msm_camera_set_clk_flags(struct clk *clk, unsigned long flags)
	if (!clk)
		return -EINVAL;

	CDBG("clk : %p, flags : %ld\n", clk, flags);
	CDBG("clk : %pK, flags : %ld\n", clk, flags);

	return clk_set_flags(clk, flags);
}
+1 −1
Original line number Diff line number Diff line
@@ -1027,7 +1027,7 @@ static int msm_vfe40_start_fetch_engine(struct vfe_device *vfe_dev,
		rc = vfe_dev->buf_mgr->ops->get_buf_by_index(
			vfe_dev->buf_mgr, bufq_handle, fe_cfg->buf_idx, &buf);
		if (rc < 0 || !buf) {
			pr_err("%s: No fetch buffer rc= %d buf= %p\n",
			pr_err("%s: No fetch buffer rc= %d buf= %pK\n",
				__func__, rc, buf);
			return -EINVAL;
		}
+3 −3
Original line number Diff line number Diff line
@@ -67,7 +67,7 @@ static int msm_isp_axi_create_stream(struct vfe_device *vfe_dev,
	} else {
		/* check if the stream has been added for the vfe-device */
		if (stream_info->vfe_mask & (1 << vfe_dev->pdev->id)) {
			pr_err("%s: stream %p/%x is already added for vfe dev %d vfe_mask %x\n",
			pr_err("%s: stream %pK/%x is already added for vfe dev %d vfe_mask %x\n",
				__func__, stream_info, stream_info->stream_id,
				vfe_dev->pdev->id, stream_info->vfe_mask);
			return -EINVAL;
@@ -1255,7 +1255,7 @@ int msm_isp_release_axi_stream(struct vfe_device *vfe_dev, void *arg)
	if (vfe_idx == -ENOTTY ||
		stream_release_cmd->stream_handle !=
		stream_info->stream_handle[vfe_idx]) {
		pr_err("%s: Invalid stream %p handle %x/%x vfe_idx %d vfe_dev %d num_isp %d\n",
		pr_err("%s: Invalid stream %pK handle %x/%x vfe_idx %d vfe_dev %d num_isp %d\n",
			__func__, stream_info,
			stream_release_cmd->stream_handle,
			vfe_idx != -ENOTTY ?
@@ -3483,7 +3483,7 @@ static int msm_isp_stream_axi_cfg_update(struct vfe_device *vfe_dev,
	if (stream_info->update_vfe_mask) {
		if (stream_info->update_vfe_mask & (1 << vfe_dev->pdev->id)) {
			spin_unlock_irqrestore(&stream_info->lock, flags);
			pr_err("%s: Stream %p/%x Update already in progress for vfe %d\n",
			pr_err("%s: Stream %pK/%x Update already in progress for vfe %d\n",
				__func__, stream_info, stream_info->stream_src,
				vfe_dev->pdev->id);
			return -EINVAL;
+2 −2
Original line number Diff line number Diff line
@@ -286,7 +286,7 @@ static int msm_vb2_put_buf(struct vb2_v4l2_buffer *vb, int session_id,
				break;
		}
		if (vb2_v4l2_buf != vb) {
			pr_err("VB buffer is INVALID vb=%p, ses_id=%d, str_id=%d\n",
			pr_err("VB buffer is INVALID vb=%pK, ses_id=%d, str_id=%d\n",
					vb, session_id, stream_id);
			spin_unlock_irqrestore(&stream->stream_lock, flags);
			return -EINVAL;
@@ -329,7 +329,7 @@ static int msm_vb2_buf_done(struct vb2_v4l2_buffer *vb, int session_id,
				break;
		}
		if (vb2_v4l2_buf != vb) {
			pr_err("VB buffer is INVALID ses_id=%d, str_id=%d, vb=%p\n",
			pr_err("VB buffer is INVALID ses_id=%d, str_id=%d, vb=%pK\n",
				    session_id, stream_id, vb);
			spin_unlock_irqrestore(&stream->stream_lock, flags);
			return -EINVAL;
+1 −1
Original line number Diff line number Diff line
@@ -794,7 +794,7 @@ int32_t msm_camera_tz_i2c_register_sensor(
		return -EINVAL;
	}

	CDBG("id=%d, client=%p\n", s_ctrl->id, s_ctrl);
	CDBG("id=%d, client=%pK\n", s_ctrl->id, s_ctrl);
	sensor_info[s_ctrl->id].s_ctrl = s_ctrl;
	sensor_info[s_ctrl->id].secure = s_ctrl->is_secure;
	return 0;