linux/drivers/accel/ivpu
Karol Wachowski 54c49eca38 accel/ivpu: Prevent recovery work from being queued during device removal
commit 69a79ada8e upstream.

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
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2025-09-09 18:58:14 +02:00
..
ivpu_coredump.c accel/ivpu: Add coredump support 2025-02-27 04:30:15 -08:00
ivpu_coredump.h accel/ivpu: Add coredump support 2025-02-27 04:30:15 -08:00
ivpu_debugfs.c accel/ivpu: Fix reset_engine debugfs file logic 2025-08-15 12:14:10 +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-09 18:58:14 +02:00
ivpu_drv.h accel/ivpu: Make command queue ID allocated on XArray 2025-07-06 11:01:38 +02:00
ivpu_fw.c accel/ivpu: Use firmware names from upstream repo 2025-06-27 11:11:25 +01:00
ivpu_fw.h accel/ivpu: Add auto selection logic for job scheduler 2025-05-02 07:58:56 +02:00
ivpu_fw_log.c accel/ivpu: Fix fw log printing 2025-05-22 14:29:53 +02:00
ivpu_fw_log.h accel/ivpu: Refactor functions in ivpu_fw_log.c 2025-05-22 14:29:52 +02:00
ivpu_gem.c accel/ivpu: Fix warning in ivpu_gem_bo_free() 2025-06-27 11:11:25 +01:00
ivpu_gem.h accel/ivpu: Use dma_resv_lock() instead of a custom mutex 2025-06-27 11:11:25 +01:00
ivpu_hw.c accel/ivpu: Add debugfs interface for setting HWS priority bands 2025-07-06 11:01:38 +02:00
ivpu_hw.h accel/ivpu: Add debugfs interface for setting HWS priority bands 2025-07-06 11:01:38 +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 2025-06-10 07:12:59 -04:00
ivpu_hw_btrs.c accel/ivpu: Fix the NPU's DPU frequency calculation 2025-05-02 07:58:56 +02:00
ivpu_hw_btrs.h accel/ivpu: Correct DCT interrupt handling 2025-05-09 09:50:39 +02:00
ivpu_hw_btrs_lnl_reg.h accel/ivpu: Implement DCT handling 2024-06-14 09:13:32 +02: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: Update power island delays 2025-06-10 07:12:59 -04: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: Fix verbose version of REG_POLL macros 2023-10-23 08:57:25 +02:00
ivpu_ipc.c accel/ivpu: Fix warning in ivpu_ipc_send_receive_internal() 2025-04-20 10:15:42 +02:00
ivpu_ipc.h accel/ivpu: Add FW state dump on TDR 2025-02-27 04:30:15 -08:00
ivpu_job.c accel/ivpu: Trigger device recovery on engine reset/resume failure 2025-07-06 11:01:38 +02:00
ivpu_job.h accel/ivpu: Make command queue ID allocated on XArray 2025-07-06 11:01:38 +02:00
ivpu_jsm_msg.c accel/ivpu: Trigger device recovery on engine reset/resume failure 2025-07-06 11:01:38 +02:00
ivpu_jsm_msg.h accel/ivpu: Add FW state dump on TDR 2025-02-27 04:30:15 -08:00
ivpu_mmu.c accel/ivpu: Abort all jobs after command queue unregister 2025-05-09 09:50:50 +02:00
ivpu_mmu.h accel/ivpu: Dump MMU events in case of VPU boot timeout 2024-01-22 10:27:37 +01:00
ivpu_mmu_context.c accel/ivpu: Make parts of FW image read-only 2024-06-14 09:14:29 +02:00
ivpu_mmu_context.h accel/ivpu: Make parts of FW image read-only 2024-06-14 09:14:29 +02:00
ivpu_ms.c accel/ivpu: Fix deadlock in ivpu_ms_cleanup() 2025-04-20 10:15:42 +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-09 18:58:14 +02:00
ivpu_pm.h accel/ivpu: Prevent recovery work from being queued during device removal 2025-09-09 18:58:14 +02:00
ivpu_sysfs.c accel/ivpu: Abort all jobs after command queue unregister 2025-05-09 09:50:50 +02:00
ivpu_sysfs.h accel/ivpu: Share NPU busy time in sysfs 2024-05-15 07:42:29 +02:00
Kconfig accel/ivpu: Add coredump support 2025-02-27 04:30:15 -08:00
Makefile accel/ivpu: Add coredump support 2025-02-27 04:30:15 -08:00
vpu_boot_api.h accel/ivpu: Update VPU FW API headers 2025-05-09 09:50:49 +02:00
vpu_jsm_api.h accel/ivpu: Update VPU FW API headers 2025-05-09 09:50:49 +02:00