]> git.baikalelectronics.ru Git - kernel.git/commit
media: st-hva: Fix potential NULL pointer dereferences
authorEvgeny Novikov <novikov@ispras.ru>
Wed, 19 May 2021 12:04:49 +0000 (14:04 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 2 Jun 2021 12:05:00 +0000 (14:05 +0200)
commit4e1f00655e813e7506160281a645b28364f07db2
treeaaa804bb61866439f185e329546dc7e492667369
parent41afbe206400bb66ce858e555a167b4d4eabcc2e
media: st-hva: Fix potential NULL pointer dereferences

When ctx_id >= HVA_MAX_INSTANCES in hva_hw_its_irq_thread() it tries to
access fields of ctx that is NULL at that point. The patch gets rid of
these accesses.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Evgeny Novikov <novikov@ispras.ru>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/sti/hva/hva-hw.c