mirror-linux/drivers/accel/ivpu
Karol Wachowski 69a79ada8e accel/ivpu: Prevent recovery work from being queued during device removal
Use disable_work_sync() instead of cancel_work_sync() in ivpu_dev_fini()
to ensure that no new recovery work items can be queued after device
removal has started. Previously, recovery work could be scheduled even
after canceling existing work, potentially leading to use-after-free
bugs if recovery accessed freed resources.

Rename ivpu_pm_cancel_recovery() to ivpu_pm_disable_recovery() to better
reflect its new behavior.

Fixes: 58cde80f45 ("accel/ivpu: Use dedicated work for job timeout detection")
Cc: stable@vger.kernel.org # v6.8+
Signed-off-by: Karol Wachowski <karol.wachowski@intel.com>
Reviewed-by: Lizhi Hou <lizhi.hou@amd.com>
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Link: https://lore.kernel.org/r/20250808110939.328366-1-jacek.lawrynowicz@linux.intel.com
2025-09-01 12:37:21 +02:00
..
Kconfig accel/ivpu: Add debug Kconfig option 2024-10-30 10:23:49 +01:00
Makefile accel/ivpu: Add debug Kconfig option 2024-10-30 10:23:49 +01:00
ivpu_coredump.c accel/ivpu: Add coredump support 2024-10-11 12:44:38 +02:00
ivpu_coredump.h accel/ivpu: Add coredump support 2024-10-11 12:44:38 +02:00
ivpu_debugfs.c accel/ivpu: Use effective buffer size for zero terminator 2025-05-12 15:12:44 +02:00
ivpu_debugfs.h accel/ivpu: Compile ivpu_debugfs.c conditionally 2023-09-27 13:11:51 +02:00
ivpu_drv.c accel/ivpu: Prevent recovery work from being queued during device removal 2025-09-01 12:37:21 +02:00
ivpu_drv.h accel/ivpu: Add turbo flag to the DRM_IVPU_CMDQ_CREATE ioctl 2025-06-16 13:35:42 +02:00
ivpu_fw.c accel/ivpu: Use firmware names from upstream repo 2025-05-28 11:44:03 +02:00
ivpu_fw.h accel/ivpu: Implement heartbeat-based TDR mechanism 2025-04-25 09:49:11 +02:00
ivpu_fw_log.c accel/ivpu: Fix fw log printing 2024-10-11 12:43:49 +02:00
ivpu_fw_log.h accel/ivpu: Add coredump support 2024-10-11 12:44:38 +02:00
ivpu_gem.c drm-fixes for v6.16-rc1 2025-06-06 09:26:47 -07:00
ivpu_gem.h accel/ivpu: Use dma_resv_lock() instead of a custom mutex 2025-06-05 14:36:37 +02:00
ivpu_hw.c Merge drm/drm-next into drm-misc-next 2025-06-11 09:01:34 +02:00
ivpu_hw.h accel/ivpu: Show NPU frequency in sysfs 2025-04-11 12:01:20 +02:00
ivpu_hw_37xx_reg.h accel/ivpu: Split IP and buttress headers 2024-05-17 08:30:23 +02:00
ivpu_hw_40xx_reg.h accel/ivpu: Update power island delays 2024-10-11 12:53:44 +02:00
ivpu_hw_btrs.c accel/ivpu: Show NPU frequency in sysfs 2025-04-11 12:01:20 +02:00
ivpu_hw_btrs.h accel/ivpu: Correct DCT interrupt handling 2025-04-25 10:29:35 +02:00
ivpu_hw_btrs_lnl_reg.h accel/ivpu: Add platform detection for presilicon 2025-01-09 09:35:45 +01:00
ivpu_hw_btrs_mtl_reg.h accel/ivpu: Split IP and buttress headers 2024-05-17 08:30:23 +02:00
ivpu_hw_ip.c accel/ivpu: Add initial Wildcat Lake support 2025-06-16 13:35:27 +02:00
ivpu_hw_ip.h accel/ivpu: Replace wake_thread with kfifo 2024-05-17 08:30:27 +02:00
ivpu_hw_reg_io.h accel/ivpu: Add support for hardware fault injection 2025-02-03 10:39:45 +01:00
ivpu_ipc.c Merge drm/drm-fixes into drm-misc-fixes 2025-04-08 10:15:47 +02:00
ivpu_ipc.h accel/ivpu: Use workqueue for IRQ handling 2025-01-09 09:35:44 +01:00
ivpu_job.c accel/ivpu: Add turbo flag to the DRM_IVPU_CMDQ_CREATE ioctl 2025-06-16 13:35:42 +02:00
ivpu_job.h accel/ivpu: Set command queue management capability based on HWS 2025-01-09 09:35:44 +01:00
ivpu_jsm_msg.c accel/ivpu: Trigger device recovery on engine reset/resume failure 2025-06-05 14:36:56 +02:00
ivpu_jsm_msg.h accel/ivpu: Add FW state dump on TDR 2024-10-11 12:44:38 +02:00
ivpu_mmu.c accel/ivpu: Add missing locks around mmu queues 2025-02-10 10:45:40 +01:00
ivpu_mmu.h accel/ivpu: Move parts of MMU event IRQ handling to thread handler 2025-01-09 09:35:44 +01:00
ivpu_mmu_context.c Merge drm/drm-next into drm-misc-next 2025-02-06 13:47:32 +01:00
ivpu_mmu_context.h accel/ivpu: Dump only first MMU fault from single context 2025-01-09 09:35:44 +01:00
ivpu_ms.c accel/ivpu: Fix PM related deadlocks in MS IOCTLs 2025-03-31 14:19:05 +02:00
ivpu_ms.h accel/ivpu: Add NPU profiling support 2024-05-15 07:42:23 +02:00
ivpu_pm.c accel/ivpu: Prevent recovery work from being queued during device removal 2025-09-01 12:37:21 +02:00
ivpu_pm.h accel/ivpu: Prevent recovery work from being queued during device removal 2025-09-01 12:37:21 +02:00
ivpu_sysfs.c accel/ivpu: Show NPU frequency in sysfs 2025-04-11 12:01:20 +02:00
ivpu_sysfs.h accel/ivpu: Share NPU busy time in sysfs 2024-05-15 07:42:29 +02:00
ivpu_trace.h accel/ivpu: Add tracing for IPC/PM/JOB 2024-10-11 12:44:39 +02:00
ivpu_trace_points.c accel/ivpu: Add tracing for IPC/PM/JOB 2024-10-11 12:44:39 +02:00
vpu_boot_api.h accel/ivpu: Update FW Boot API to version 3.28.3 2025-04-11 11:50:31 +02:00
vpu_jsm_api.h accel/ivpu: Update FW Boot API to version 3.28.3 2025-04-11 11:50:31 +02:00