media: mediatek: unregister VPU watchdog handlers
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest3 patches 1 replyIn review
- v11 patch 1 replySuperseded
Changes in v2 from the cover letter
- 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.
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | media: mediatek: vpu: add watchdog handler unregister helperdrivers/ drivers/ | +16 | 1 reply | |
| 2/3 | media: mediatek: vcodec: unregister VPU watchdog handlerdrivers/ | +6 | 0 replies | |
| 3/3 | media: mtk-mdp: unregister VPU watchdog handlerdrivers/ | +2 | 0 replies |
Reviews trailers per patch
1 of 3 patches has a Reviewed-by or Acked-by.
| Patch | Nicolas Dufresne |
|---|---|
| 1/3 | |
| 2/3 | |
| 3/3 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/3] media: mediatek: unregister VPU watchdog handlers
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