diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2017-02-15 06:11:17 -0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-02-15 06:11:17 -0800 |
commit | 584a2fcb3fb34b816601839d553130f7e66bb928 (patch) | |
tree | 0ff254abeb2c610c899216279c146275ec7fbece | |
parent | b09d016fa4543328f9acf0b026b1f25eaa50658f (diff) | |
parent | e5fdaa6b3b42c9c17ca31391e73cf47d876e2131 (diff) |
Merge "msm: vidc: Fix crash due to invalid instance access"
-rw-r--r-- | drivers/media/platform/msm/vidc/msm_vidc_common.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/media/platform/msm/vidc/msm_vidc_common.c b/drivers/media/platform/msm/vidc/msm_vidc_common.c index 21602d8d49e5..6a5e89c76afa 100644 --- a/drivers/media/platform/msm/vidc/msm_vidc_common.c +++ b/drivers/media/platform/msm/vidc/msm_vidc_common.c @@ -1694,19 +1694,11 @@ static void handle_sys_error(enum hal_command_response cmd, void *data) dprintk(VIDC_ERR, "SYS_ERROR can potentially crash the system\n"); - /* - * For SYS_ERROR, there will not be any inst pointer. - * Just grab one of the inst from instances list and - * use it. - */ - mutex_lock(&core->lock); - inst = list_first_entry_or_null(&core->instances, - struct msm_vidc_inst, list); + list_for_each_entry(inst, &core->instances, list) + msm_comm_print_inst_info(inst); mutex_unlock(&core->lock); - msm_comm_print_debug_info(inst); - BUG_ON(core->resources.debug_timeout); } |