linux-stable/drivers/dma
Dave Jiang a5fe76328e dmaengine: idxd: force wq context cleanup on device disable path
commit 44c4237cf3 upstream.

Testing shown that when a wq mode is setup to be dedicated and then torn
down and reconfigured to shared, the wq configured end up being dedicated
anyays. The root cause is when idxd_device_wqs_clear_state() gets called
during idxd_driver removal, idxd_wq_disable_cleanup() does not get called
vs when the wq driver is removed first. The check of wq state being
"enabled" causes the cleanup to be bypassed. However, idxd_driver->remove()
releases all wq drivers. So the wqs goes to "disabled" state and will never
be "enabled". By that point, the driver has no idea if the wq was
previously configured or clean. So force call idxd_wq_disable_cleanup() on
all wqs always to make sure everything gets cleaned up.

Reported-by: Tony Zhu <tony.zhu@intel.com>
Tested-by: Tony Zhu <tony.zhu@intel.com>
Fixes: 0dcfe41e9a ("dmanegine: idxd: cleanup all device related bits after disabling device")
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Co-developed-by: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
Link: https://lore.kernel.org/r/20220628230056.2527816-1-fenghua.yu@intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-07-12 16:35:19 +02:00
..
bestcomm dmaengine: bestcomm: fix system boot lockups 2021-11-18 19:17:16 +01:00
dw dmaengine: dw: Simplify DT property parser 2021-08-06 19:18:59 +05:30
dw-axi-dmac dmaengine: dw-axi-dmac: Burst length settings 2021-08-02 12:19:52 +05:30
dw-edma dmaengine: dw-edma: Fix unaligned 64bit access 2022-04-27 14:38:52 +02:00
fsl-dpaa2-qdma dmaengine: fsl-dpaa2-qdma: Fix spelling mistake "faile" -> "failed" 2021-08-29 19:14:20 +05:30
hsu dmaengine: hsu: Account transferred bytes 2021-05-31 09:50:39 +05:30
idxd dmaengine: idxd: force wq context cleanup on device disable path 2022-07-12 16:35:19 +02:00
ioat dmaengine: ioatdma: remove unused function missed during dma_v2 removal 2020-11-16 22:42:28 +05:30
ipu dmaengine: ipu: Fix fall-through warning for Clang 2021-07-13 14:38:47 -05:00
lgm dmaengine: lgm: Fix an error handling path in intel_ldma_probe() 2022-07-12 16:35:18 +02:00
mediatek dmaengine: mediatek:Fix PM usage reference leak of mtk_uart_apdma_alloc_chan_resources 2022-04-27 14:38:52 +02:00
ppc4xx ppc4xx: replace sscanf() by kstrtoul() 2021-07-28 12:40:51 +05:30
ptdma dmaengine: ptdma: Fix the error handling path in pt_core_init() 2022-02-23 12:03:21 +01:00
qcom dmaengine: qcom: bam_dma: fix runtime PM underflow 2022-07-12 16:35:18 +02:00
sf-pdma dmaengine updates for v5.14-rc1 2021-07-05 12:05:13 -07:00
sh dmaengine: Revert "dmaengine: shdma: Fix runtime PM imbalance on error" 2022-04-13 20:59:26 +02:00
ti dmaengine: ti: Add missing put_device in ti_dra7_xbar_route_allocate 2022-07-12 16:35:18 +02:00
xilinx dmaengine: zynqmp_dma: In struct zynqmp_dma_chan fix desc_size data type 2022-06-14 18:36:15 +02:00
acpi-dma.c dmaengine: acpi: Check for errors from acpi_register_gsi() separately 2021-08-06 21:48:11 +05:30
altera-msgdma.c dmaengine: altera-msgdma: make response port optional 2021-07-28 12:25:10 +05:30
amba-pl08x.c
at_hdmac.c dmaengine: at_hdmac: remove platform data header 2021-01-08 13:57:19 +05:30
at_hdmac_regs.h dmaengine: at_hdmac: remove platform data header 2021-01-08 13:57:19 +05:30
at_xdmac.c dmaengine: at_xdma: handle errors of at_xdmac_alloc_desc() correctly 2022-07-12 16:35:18 +02:00
bcm-sba-raid.c
bcm2835-dma.c
dma-axi-dmac.c
dma-jz4780.c dmaengine: jz4780: Add support for the JZ4760(B) 2021-01-26 22:45:22 +05:30
dmaengine.c dmaengine: Fix a double free in dma_async_device_register 2021-04-12 15:05:58 +05:30
dmaengine.h dmaengine: dmaengine_desc_callback_valid(): Check for callback_result 2021-11-18 19:17:02 +01:00
dmatest.c dmaengine: dmatest: Use dmaengine_get_dma_device 2020-12-11 21:20:08 +05:30
ep93xx_dma.c dmaengine: ep93xx: Prepare clock before using it 2021-08-02 12:27:10 +05:30
fsl-edma-common.c
fsl-edma-common.h
fsl-edma.c
fsl-qdma.c dmaengine: fsl-qdma: check dma_set_mask return value 2021-05-10 19:51:03 +05:30
fsl_raid.c dmaengine: fsl: remove bad channel update 2020-10-05 09:59:17 +05:30
fsl_raid.h
fsldma.c dmaengine: fsldma: Fix a resource leak in an error handling path of the probe function 2021-01-12 18:00:39 +05:30
fsldma.h
hisi_dma.c dmaengine: hisi_dma: fix MSI allocate fail when reload hisi_dma 2022-04-08 14:23:47 +02:00
idma64.c dmaengine: idma64: Switch to use __maybe_unused instead of ifdeffery 2020-11-09 17:21:05 +05:30
idma64.h
img-mdc-dma.c
imx-dma.c dmaengine: imx-dma: configure the generic DMA type to make it work 2021-08-02 12:31:19 +05:30
imx-sdma.c dmaengine: imx-sdma: Allow imx8m for imx7 FW revs 2022-07-12 16:35:17 +02:00
iop-adma.c Merge branch 'topic/tasklet' into next 2020-10-01 10:18:59 +05:30
iop-adma.h
k3dma.c dmaengine: k3dma: use the correct HiSilicon copyright 2021-04-12 17:14:53 +05:30
Kconfig dmaengine: ptdma: Initial driver for the AMD PTDMA 2021-08-29 19:14:20 +05:30
lpc18xx-dmamux.c
Makefile dmaengine: ptdma: Initial driver for the AMD PTDMA 2021-08-29 19:14:20 +05:30
mcf-edma.c
milbeaut-hdmac.c
milbeaut-xdmac.c dmaengine: milbeaut-xdmac: Fix a resource leak in the error handling path of the probe function 2020-12-29 10:08:00 +05:30
mmp_pdma.c dmaengine: pxa/mmp: stop referencing config->slave_id 2022-01-27 11:04:13 +01:00
mmp_tdma.c
moxart-dma.c dmaengine: moxart-dma: remove redundant irqsave and irqrestore in hardIRQ 2020-11-09 17:25:54 +05:30
mpc512x_dma.c dmaengine: mpc512x: Fix fall-through warning for Clang 2021-07-14 11:05:55 -05:00
mv_xor.c dmaengine: mv_xor: drop of_match_ptr from of_device_id table 2020-11-24 23:02:20 +05:30
mv_xor.h
mv_xor_v2.c dmaengine: mv_xor_v2: Fix error return code in mv_xor_v2_probe() 2020-11-24 22:55:15 +05:30
mxs-dma.c dmaengine: mxs-dma: Remove the unused .id_table 2020-11-24 22:55:15 +05:30
nbpfaxi.c dmaengine: nbpfaxi: convert tasklets to use new tasklet_setup() API 2020-09-18 12:19:06 +05:30
of-dma.c dmaengine: of-dma: router_xlate to return -EPROBE_DEFER if controller is not yet available 2021-07-28 12:54:50 +05:30
owl-dma.c dmaengine: owl-dma: Fix a resource leak in the remove function 2021-01-12 18:00:40 +05:30
pch_dma.c dmaengine: pch_dma: convert tasklets to use new tasklet_setup() API 2020-09-18 12:19:06 +05:30
pl330.c dmaengine: pl330: Fix lockdep warning about non-static key 2022-07-12 16:35:18 +02:00
plx_dma.c dmaengine: plx_dma: add a missing put_device() on error path 2021-04-12 15:13:51 +05:30
pxa_dma.c dmaengine: pxa/mmp: stop referencing config->slave_id 2022-01-27 11:04:13 +01:00
s3c24xx-dma.c
sa11x0-dma.c dmaengine: sa11x0: convert tasklets to use new tasklet_setup() API 2020-09-18 12:19:07 +05:30
sprd-dma.c dmaengine: sprd: Add missing MODULE_DEVICE_TABLE 2021-07-15 17:47:38 +05:30
st_fdma.c dmaengine: st_fdma: fix MODULE_ALIAS 2021-12-22 09:32:41 +01:00
st_fdma.h
ste_dma40.c dmaengine: stedma40: add missing iounmap() on error in d40_probe() 2021-05-31 09:47:27 +05:30
ste_dma40_ll.c
ste_dma40_ll.h
stm32-dma.c dmaengine: stm32-dma: avoid 64-bit division in stm32_dma_get_max_width 2021-11-18 19:17:11 +01:00
stm32-dmamux.c dmaengine: stm32-dmamux: Fix PM disable depth imbalance in stm32_dmamux_probe 2022-02-23 12:03:21 +01:00
stm32-mdma.c dmaengine: stm32-mdma: fix chan initialization in stm32_mdma_irq_handler() 2022-06-09 10:23:15 +02:00
sun4i-dma.c dmaengine: sun4i: Use list_move_tail instead of list_del/list_add_tail 2021-06-07 17:06:38 +05:30
sun6i-dma.c dmaengine: sun6i: Add support for A100 DMA 2020-11-18 16:28:49 +05:30
tegra20-apb-dma.c dmaengine: tegra20: Fix runtime PM imbalance on error 2021-04-12 15:10:44 +05:30
tegra210-adma.c dmaengine: tegra210-adma: fix pm runtime unbalance 2021-11-18 19:17:03 +01:00
timb_dma.c dmaengine: timb_dma: convert tasklets to use new tasklet_setup() API 2020-09-18 12:19:07 +05:30
TODO
txx9dmac.c dmaengine: txx9dmac: convert tasklets to use new tasklet_setup() API 2020-09-18 12:19:07 +05:30
txx9dmac.h
uniphier-mdmac.c
uniphier-xdmac.c dmaengine: uniphier-xdmac: Fix type of address variables 2022-01-27 11:05:23 +01:00
virt-dma.c dmaengine: virt-dma: convert tasklets to use new tasklet_setup() API 2020-09-18 12:19:07 +05:30
virt-dma.h
xgene-dma.c dmaengine: xgene: convert tasklets to use new tasklet_setup() API 2020-09-18 12:19:07 +05:30