]> git.baikalelectronics.ru Git - kernel.git/commit
media: allegro: ignore interrupt if mailbox is not initialized
authorMichael Tretter <m.tretter@pengutronix.de>
Wed, 8 Sep 2021 13:03:10 +0000 (14:03 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 20 Oct 2021 14:52:13 +0000 (15:52 +0100)
commit5f221902d1a8e475567893adb905476e2c97de33
treeae9433d743f222852c37dd20c234d9bbd5df4439
parentd44e2f610855a60c602bb2cbbfa28794f835931c
media: allegro: ignore interrupt if mailbox is not initialized

The mailbox is initialized after the interrupt handler is installed. As
the firmware is loaded and started even later, it should not happen that
the interrupt occurs without the mailbox being initialized.

As the Linux Driver Verification project (linuxtesting.org) keeps
reporting this as an error, add a check to ignore interrupts before the
mailbox is initialized to fix this potential null pointer dereference.

Reported-by: Yuri Savinykh <s02190703@gse.cs.msu.ru>
Reported-by: Nadezda Lutovinova <lutovinova@ispras.ru>
Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/allegro-dvt/allegro-core.c