mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 21:22:09 -04:00
msm: cvp: Fix to avoid cache entry for unwanted buffer
Error handle to avoid dereferencing of unwanted buffer during deinit Change-Id: I0414c18b5a0bba1e1f915c59ba99cce82c0e98fe Signed-off-by: Haseeb Khan <hkhan@codeaurora.org>
This commit is contained in:
parent
c0a8ba67dd
commit
fa2c98ac0e
1 changed files with 5 additions and 1 deletions
|
|
@ -382,7 +382,11 @@ static struct msm_cvp_smem *msm_cvp_session_get_smem(struct msm_cvp_inst *inst,
|
|||
rc = msm_cvp_map_smem(inst, smem, "map cpu");
|
||||
if (rc)
|
||||
goto exit;
|
||||
|
||||
if (buf->size > smem->size || buf->size > smem->size - buf->offset) {
|
||||
dprintk(CVP_ERR, "%s: invalid offset %d or size %d for a new entry\n",
|
||||
__func__, buf->offset, buf->size);
|
||||
goto exit2;
|
||||
}
|
||||
rc = msm_cvp_session_add_smem(inst, smem);
|
||||
if (rc && rc != -ENOMEM)
|
||||
goto exit2;
|
||||
|
|
|
|||
Loading…
Reference in a new issue