mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 23:24:22 -04:00
msm: cvp:fix potential prop_array idx out range
fix potential issue that idx of prop_array could be out of range Change-Id: Ia2d6a7332f66f518b2f8d96ed999e3963f1b9284 Signed-off-by: Yu SI <ysi@codeaurora.org>
This commit is contained in:
parent
db1e19beb1
commit
e7ba166ed8
2 changed files with 3 additions and 2 deletions
|
|
@ -1125,7 +1125,7 @@ static int msm_cvp_set_sysprop(struct msm_cvp_inst *inst,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (props->prop_num >= MAX_KMD_PROP_NUM) {
|
||||
if (props->prop_num >= MAX_KMD_PROP_NUM_PER_PACKET) {
|
||||
dprintk(CVP_ERR, "Too many properties %d to set\n",
|
||||
props->prop_num);
|
||||
return -E2BIG;
|
||||
|
|
|
|||
|
|
@ -149,7 +149,8 @@ struct cvp_kmd_hfi_packet {
|
|||
#define CVP_KMD_PROP_PWR_DDR_OP 0x1C
|
||||
#define CVP_KMD_PROP_PWR_SYSCACHE_OP 0x1D
|
||||
|
||||
#define MAX_KMD_PROP_NUM (CVP_KMD_PROP_PWR_SYSCACHE_OP + 1)
|
||||
#define MAX_KMD_PROP_NUM_PER_PACKET 8
|
||||
#define MAX_KMD_PROP_TYPE (CVP_KMD_PROP_PWR_SYSCACHE_OP + 1)
|
||||
|
||||
struct cvp_kmd_sys_property {
|
||||
__u32 prop_type;
|
||||
|
|
|
|||
Loading…
Reference in a new issue