mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-10 04:48:04 +09:00
vdec: fix crash in vdec_get_default_vdec_for_userdata. [1/1]
PD#SWPL-6811 Problem: Unable to handle kernel NULL pointer dereference at virtual address 00000114 PC is at vdec_get_default_vdec_for_userdata+0x50/0x8c [decoder_common] LR is at 0x0 Solution: vdec in vdec_connect_list searched is NULL, it's may moved to disconnect list. Verify: x301 Change-Id: I407b0115fd4dfacf2bf575f1d981e079702b8800 Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
This commit is contained in:
committed by
Dongjin Kim
parent
ebb06aed1a
commit
e138484e6a
@@ -2554,6 +2554,7 @@ static int vdec_core_thread(void *data)
|
||||
{
|
||||
struct vdec_core_s *core = (struct vdec_core_s *)data;
|
||||
struct sched_param param = {.sched_priority = MAX_RT_PRIO/2};
|
||||
unsigned long flags;
|
||||
int i;
|
||||
|
||||
sched_setscheduler(current, SCHED_FIFO, ¶m);
|
||||
@@ -2629,6 +2630,7 @@ static int vdec_core_thread(void *data)
|
||||
*/
|
||||
|
||||
/* check disconnected decoders */
|
||||
flags = vdec_core_lock(vdec_core);
|
||||
list_for_each_entry_safe(vdec, tmp,
|
||||
&core->connected_vdec_list, list) {
|
||||
if ((vdec->status == VDEC_STATUS_CONNECTED) &&
|
||||
@@ -2644,6 +2646,7 @@ static int vdec_core_thread(void *data)
|
||||
list_move(&vdec->list, &disconnecting_list);
|
||||
}
|
||||
}
|
||||
vdec_core_unlock(vdec_core, flags);
|
||||
mutex_unlock(&vdec_mutex);
|
||||
/* elect next vdec to be scheduled */
|
||||
vdec = core->last_vdec;
|
||||
|
||||
Reference in New Issue
Block a user