DivestOS/Patches/Linux_CVEs/CVE-2016-3939/ANY/0001.patch
2017-11-07 17:32:46 -05:00

50 lines
1.7 KiB
Diff

From e0bb18771d6ca71db2c2a61226827059be3fa424 Mon Sep 17 00:00:00 2001
From: Ping Li <pingli@codeaurora.org>
Date: Fri, 15 Apr 2016 15:27:36 -0700
Subject: msm: mdss: Correct block id check for mdss_mdp_misr_table
DISPLAY_MISR_LCDC block doesn't have corresponding mdss_mdp_misr_table,
this change corrects the block id check for mdss_mdp_misr_table.
CRs-Fixed: 1001224
Change-Id: I74b03c31542d4b239eb2ffdc4dc6345dff5eab86
Signed-off-by: Ping Li <pingli@codeaurora.org>
---
drivers/video/msm/mdss/mdss_debug.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/video/msm/mdss/mdss_debug.c b/drivers/video/msm/mdss/mdss_debug.c
index e4749c5..e1d4b5f 100644
--- a/drivers/video/msm/mdss/mdss_debug.c
+++ b/drivers/video/msm/mdss/mdss_debug.c
@@ -1266,7 +1266,7 @@ static inline struct mdss_mdp_misr_map *mdss_misr_get_map(u32 block_id,
char *ctrl_reg = NULL, *value_reg = NULL;
char *intf_base = NULL;
- if (block_id > DISPLAY_MISR_MDP) {
+ if (block_id > DISPLAY_MISR_HDMI && block_id != DISPLAY_MISR_MDP) {
pr_err("MISR Block id (%d) out of range\n", block_id);
return NULL;
}
@@ -1408,12 +1408,16 @@ int mdss_misr_set(struct mdss_data_type *mdata,
bool is_valid_wb_mixer = true;
bool use_mdp_up_misr = false;
+ if (!mdata || !req || !ctl) {
+ pr_err("Invalid input params: mdata = %p req = %p ctl = %p",
+ mdata, req, ctl);
+ return -EINVAL;
+ }
pr_debug("req[block:%d frame:%d op_mode:%d]\n",
req->block_id, req->frame_count, req->crc_op_mode);
map = mdss_misr_get_map(req->block_id, ctl, mdata,
ctl->is_video_mode);
-
if (!map) {
pr_err("Invalid MISR Block=%d\n", req->block_id);
return -EINVAL;
--
cgit v1.1