video: driver: reset required buffer attributes

Reset all attributes except read only attribute
in msm_vidc_get_driver_buf() for an existing buffer
to avoid buffer flow problems in driver.

Change-Id: If6170caa9b9315f73b6023ef496aed2ba3e6efba
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
这个提交包含在:
Maheshwar Ajja
2021-02-18 19:48:13 -08:00
父节点 34ca840018
当前提交 0cae147e2a

查看文件

@@ -1380,7 +1380,11 @@ struct msm_vidc_buffer *msm_vidc_get_driver_buf(struct msm_vidc_inst *inst,
buf->dmabuf = dmabuf;
INIT_LIST_HEAD(&buf->list);
list_add_tail(&buf->list, &buffers->list);
} else {
/* reset all attributes except read only */
buf->attr &= MSM_VIDC_ATTR_READ_ONLY;
}
rc = vb2_buffer_to_driver(vb2, buf);
if (rc)
goto error;