Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] media: mediatek: unregister VPU watchdog handlers
@ 2026-07-20  8:57 Guangshuo Li
  2026-07-20  8:57 ` [PATCH v2 1/3] media: mediatek: vpu: add watchdog handler unregister helper Guangshuo Li
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Guangshuo Li @ 2026-07-20  8:57 UTC (permalink / raw)
  To: Minghsiu Tsai, Houlong Wei, Andrew-CT Chen, Mauro Carvalho Chehab,
	Matthias Brugger, AngeloGioacchino Del Regno, Tiffany Lin,
	Yunfei Dong, Hans Verkuil, Nicolas Dufresne, Chen-Yu Tsai,
	Fei Shao, Tomasz Figa, Guangshuo Li, Haoxiang Li, Eizan Miyamoto,
	Enric Balletbo i Serra, linux-media, linux-kernel,
	linux-arm-kernel, linux-mediatek

The Mediatek vcodec and MDP drivers register watchdog reset handlers
with the VPU driver and pass driver-owned objects as private data.

These handlers can remain registered after an initialization failure or
device removal. A later VPU watchdog reset can therefore invoke a
handler with stale private data and potentially dereference freed
memory.

This series adds a common helper for unregistering VPU watchdog
handlers, then uses it in the vcodec and MDP cleanup paths before their
VPU device references are released.

The series is organized as follows:

1. Add vpu_wdt_unreg_handler() to the VPU driver.
2. Unregister the vcodec watchdog handler during initialization
   failure and firmware release.
3. Unregister the MDP watchdog handler during probe failure and
   device removal.

v2:

  - Split the changes into three patches as requested by Nicolas.
  - Fix the extra blank line reported by checkpatch.
  - Carry Nicolas' Reviewed-by tag on the MDP patch.

Guangshuo Li (3):
media: mediatek: vpu: add watchdog handler unregister helper
media: mediatek: vcodec: unregister VPU watchdog handler
media: mtk-mdp: unregister VPU watchdog handler

drivers/media/platform/mediatek/mdp/mtk_mdp_core.c |  2 ++
.../mediatek/vcodec/common/mtk_vcodec_fw_vpu.c     |  6 ++++++
drivers/media/platform/mediatek/vpu/mtk_vpu.c      | 14 ++++++++++++++
drivers/media/platform/mediatek/vpu/mtk_vpu.h      |  2 ++
4 files changed, 24 insertions(+)

--
2.43.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-07-20  8:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-20  8:57 [PATCH v2 0/3] media: mediatek: unregister VPU watchdog handlers Guangshuo Li
2026-07-20  8:57 ` [PATCH v2 1/3] media: mediatek: vpu: add watchdog handler unregister helper Guangshuo Li
2026-07-20  8:57 ` [PATCH v2 2/3] media: mediatek: vcodec: unregister VPU watchdog handler Guangshuo Li
2026-07-20  8:57 ` [PATCH v2 3/3] media: mtk-mdp: " Guangshuo Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox