]> www.infradead.org Git - users/jedix/linux-maple.git/commit
dmaengine: idxd: Check availability of workqueue allocated by idxd wq driver before...
authorYi Sun <yi.sun@intel.com>
Fri, 9 May 2025 00:03:04 +0000 (08:03 +0800)
committerVinod Koul <vkoul@kernel.org>
Wed, 14 May 2025 13:50:59 +0000 (14:50 +0100)
commit17502e7d7b7113346296f6758324798d536c31fd
tree6750f7eb331219687cdcce1ee092b347faf75d7f
parent7e01511443c30a55a5ae78d3debd46d4d872517e
dmaengine: idxd: Check availability of workqueue allocated by idxd wq driver before using

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>
drivers/dma/idxd/cdev.c