linux/drivers/dma/idxd
Yi Sun 98fd66c8ba dmaengine: idxd: Check availability of workqueue allocated by idxd wq driver before using
[ Upstream commit 17502e7d7b ]

Running IDXD workloads in a container with the /dev directory mounted can
trigger a call trace or even a kernel panic when the parent process of the
container is terminated.

This issue occurs because, under certain configurations, Docker does not
properly propagate the mount replica back to the original mount point.

In this case, when the user driver detaches, the WQ is destroyed but it
still calls destroy_workqueue() attempting to completes all pending work.
It's necessary to check wq->wq and skip the drain if it no longer exists.

Signed-off-by: Yi Sun <yi.sun@intel.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>

Link: https://lore.kernel.org/r/20250509000304.1402863-1-yi.sun@intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2025-07-06 11:01:33 +02:00
..
bus.c driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
cdev.c dmaengine: idxd: Check availability of workqueue allocated by idxd wq driver before using 2025-07-06 11:01:33 +02:00
compat.c driver core: make [device_]driver_attach take a const * 2024-06-20 12:51:42 +02:00
debugfs.c dmaengine: idxd: Convert spinlock to mutex to lock evl workqueue 2024-04-07 13:31:44 +05:30
defaults.c dmaengine: idxd: Add support for device/wq defaults 2023-12-15 17:52:53 +08:00
device.c dmaengine: idxd: Convert spinlock to mutex to lock evl workqueue 2024-04-07 13:31:44 +05:30
dma.c dmaengine: add channel device name to channel registration 2024-06-11 23:55:34 +05:30
idxd.h dmaengine: idxd: Clean up cpumask and hotplug for perfmon 2024-09-10 11:44:13 +02:00
init.c dmaengine: idxd: Refactor remove call with idxd_cleanup() helper 2025-05-22 14:29:52 +02:00
irq.c dmaengine: idxd: Fix possible Use-After-Free in irq_process_work_list 2024-06-11 21:37:25 +05:30
Makefile module: Convert default symbol namespace to string literal 2025-02-08 09:57:05 +01:00
perfmon.c dmaengine updates for v6.12 2024-09-23 14:08:08 -07:00
perfmon.h dmaengine: idxd: Add IDXD performance monitor support 2021-04-25 21:46:12 +05:30
registers.h VFIO: Add the SPR_DSA and SPR_IAX devices to the denylist 2024-05-13 14:07:33 +00:00
submit.c dmaengine: Fix spelling mistakes 2024-09-02 13:56:01 +05:30
sysfs.c dmaengine: idxd: add a write() method for applications to submit work 2024-05-13 14:07:45 +00:00