]> git.proxmox.com Git - mirror_ubuntu-jammy-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)
committerAndrea Righi <andrea.righi@canonical.com>
Tue, 4 Jan 2022 08:48:16 +0000 (09:48 +0100)
commitb3f911fd71e55182a8a978872573c7b08552c73d
treead390fc65c991acd81c7401618457e229e60e081
parent009ed53f11fa0339d6d932ed8ef13af82f127ab6
media: allegro: ignore interrupt if mailbox is not initialized

BugLink: https://bugs.launchpad.net/bugs/1951822
[ Upstream commit 1ecda6393db4be44aba27a243e648dc98c9b92e3 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/media/platform/allegro-dvt/allegro-core.c