linux/drivers/accel
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
..
habanalabs accel/habanalabs/gaudi2: Use kvfree() for memory allocated with kvcalloc() 2025-08-28 16:31:06 +02:00
ivpu accel/ivpu: Prevent recovery work from being queued during device removal 2025-09-09 18:58:14 +02:00
qaic accel/qaic: Mask out SR-IOV PCI resources 2025-05-29 11:03:07 +02:00
drm_accel.c accel: Use XArray instead of IDR for minors 2024-08-26 17:06:22 +02:00
Kconfig accel/qaic: Add qaic driver to the build system 2023-04-06 08:23:03 +02:00
Makefile accel/qaic: Add qaic driver to the build system 2023-04-06 08:23:03 +02:00