]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Jul 2021 14:15:44 +0000 (16:15 +0200)
commit83dd29dad7da5b7b54429f89624556e368d1891f
treeaaa1b8c67b45da2640bd6a4e5cbd5cbc757b1714
parentfcf6b8f56302d3882b3b76b1b97ccf68ad573c38
media: st-hva: Fix potential NULL pointer dereferences

[ Upstream commit b7fdd208687ba59ebfb09b2199596471c63b69e3 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/platform/sti/hva/hva-hw.c