mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09:00
video: rockchip: mpp: vepu2: prevent core_id out of bounds
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com> Change-Id: Ib03e3be97f0902ae17f87ef3b97f1788c807be1b
This commit is contained in:
@@ -336,7 +336,7 @@ static void *vepu_prepare(struct mpp_dev *mpp, struct mpp_task *mpp_task)
|
||||
}
|
||||
|
||||
core_id = find_first_bit(&ccu->core_idle, ccu->core_num);
|
||||
|
||||
core_id = array_index_nospec(core_id, MPP_MAX_CORE_NUM);
|
||||
if (core_id >= core_id_max + 1 || !queue->cores[core_id]) {
|
||||
mpp_task = NULL;
|
||||
mpp_dbg_core("core %d all busy %lx\n", core_id, ccu->core_idle);
|
||||
|
||||
Reference in New Issue
Block a user