summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2017-03-11 10:08:11 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2017-03-11 10:08:10 -0800
commit23bb0f5efd4ff0c74c8ddace73166562ac13e638 (patch)
tree363155af51d862836c083eea7f4779918a376890
parenta2adda724d113aa6b481cff448ae2aef3cb380c7 (diff)
parent7b9ebe142b90b14805894472dd5bdb235cd81f72 (diff)
Merge "msm: camera: Bound check for num_of_stream."
-rw-r--r--drivers/media/platform/msm/camera_v2/isp/msm_isp_axi_util.c8
-rw-r--r--drivers/media/platform/msm/camera_v2/isp/msm_isp_stats_util.c6
2 files changed, 10 insertions, 4 deletions
diff --git a/drivers/media/platform/msm/camera_v2/isp/msm_isp_axi_util.c b/drivers/media/platform/msm/camera_v2/isp/msm_isp_axi_util.c
index 4e74851dc67d..98aa73d0a507 100644
--- a/drivers/media/platform/msm/camera_v2/isp/msm_isp_axi_util.c
+++ b/drivers/media/platform/msm/camera_v2/isp/msm_isp_axi_util.c
@@ -1734,7 +1734,7 @@ int msm_isp_print_ping_pong_address(struct vfe_device *vfe_dev,
}
temp = buf->mapped_info[0].paddr +
buf->mapped_info[0].len;
- pr_err("%s: stream %x ping bit %d uses buffer %pa-%pa, num_isp %d\n",
+ pr_err("%s: stream %x ping bit %d uses buffer %pK-%pK, num_isp %d\n",
__func__, stream_info->stream_src,
pingpong_bit,
&buf->mapped_info[0].paddr, &temp,
@@ -1743,10 +1743,10 @@ int msm_isp_print_ping_pong_address(struct vfe_device *vfe_dev,
for (i = 0; i < stream_info->num_planes; i++) {
for (k = 0; k < stream_info->num_isp; k++) {
pr_debug(
- "%s: stream_id %x ping-pong %d plane %d start_addr %lu addr_offset %x len %zx stride %d scanline %d\n"
+ "%s: stream_id %x ping-pong %d plane %d start_addr %pK addr_offset %x len %zx stride %d scanline %d\n"
, __func__, stream_info->stream_id,
- pingpong_bit, i, (unsigned long)
- buf->mapped_info[i].paddr,
+ pingpong_bit, i,
+ (void *)buf->mapped_info[i].paddr,
stream_info->
plane_cfg[k][i].plane_addr_offset,
buf->mapped_info[i].len,
diff --git a/drivers/media/platform/msm/camera_v2/isp/msm_isp_stats_util.c b/drivers/media/platform/msm/camera_v2/isp/msm_isp_stats_util.c
index f40af6e95272..9ce2218d5e0d 100644
--- a/drivers/media/platform/msm/camera_v2/isp/msm_isp_stats_util.c
+++ b/drivers/media/platform/msm/camera_v2/isp/msm_isp_stats_util.c
@@ -1231,6 +1231,12 @@ int msm_isp_update_stats_stream(struct vfe_device *vfe_dev, void *arg)
int vfe_idx;
int k;
+ if (update_cmd->num_streams > MSM_ISP_STATS_MAX) {
+ pr_err("%s: Invalid num_streams %d\n",
+ __func__, update_cmd->num_streams);
+ return -EINVAL;
+ }
+
/*validate request*/
for (i = 0; i < update_cmd->num_streams; i++) {
update_info = (struct msm_vfe_axi_stream_cfg_update_info *)