[PATCH v2 0/2] media: venus: fix HFI teardown races

From: mhun512

Date: Fri Sep 25 2026 - 14:42:09 EST


As part of our ongoing static-analysis research, we reviewed the Venus
teardown path and confirmed the race reported by Sashiko.

This series fixes two HFI lifetime races during teardown. The first patch
waits for the hard and threaded IRQ handlers before releasing HFI state.
The second disables and drains recovery work so it cannot be requeued
while HFI state is being torn down.

The later Sashiko report also identifies a separate resource leak when IRQ
registration fails during probe. That issue is outside this series.

Changes in v2:
- Resend the same changes using git format-patch and git send-email so each
diff --git header stays on one line. The v1 mail transport wrapped those
headers and prevented git am from parsing the patches.

Myeonghun Pak (2):
media: venus: hfi: disable IRQ before freeing HFI device
media: venus: disable recovery work before HFI teardown

drivers/media/platform/qcom/venus/core.c | 2 +-
drivers/media/platform/qcom/venus/hfi_venus.c | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)


base-commit: 4efa625593e1e9c76346232413997556dea1d89f
--
2.53.0