Andy Shevchenko
73162ca815
dmaengine: dmatest: Fix process hang when reading 'wait' parameter
...
commit aa72f1d20ee973d68f26d46fce5e1cf6f9b7e1ca upstream.
If we do
% echo 1 > /sys/module/dmatest/parameters/run
[ 115.851124] dmatest: Could not start test, no channels configured
% echo dma8chan7 > /sys/module/dmatest/parameters/channel
[ 127.563872] dmatest: Added 1 threads using dma8chan7
% cat /sys/module/dmatest/parameters/wait
... !!! HANG !!! ...
The culprit is the commit 6138f967bc
("dmaengine: dmatest: Use fixed point div to calculate iops")
which makes threads not to run, but pending and being kicked off by writing
to the 'run' node. However, it forgot to consider 'wait' routine to avoid
above mentioned case.
In order to fix this, check for really running threads, i.e. with pending
and done flags unset.
It's pity the culprit commit hadn't updated documentation and tested all
possible scenarios.
Fixes: 6138f967bc ("dmaengine: dmatest: Use fixed point div to calculate iops")
Cc: Seraj Alijan <[email protected] >
Signed-off-by: Andy Shevchenko <[email protected] >
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Vinod Koul <[email protected] >
Signed-off-by: Greg Kroah-Hartman <[email protected] >
2020-05-06 08:15:16 +02:00
..
bestcomm
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500
2019-06-19 17:09:55 +02:00
dw
dmaengine: dw: platform: Mark 'hclk' clock optional
2020-01-17 19:48:49 +01:00
dw-axi-dmac
dw-edma
dmaengine: dw-edma: fix endianess confusion
2019-07-22 20:58:15 +05:30
hsu
dmaengine updates for v5.3-rc1
2019-07-17 09:55:43 -07:00
ioat
ioat: ioat_alloc_ring() failure handling.
2020-01-17 19:49:06 +01:00
ipu
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500
2019-06-19 17:09:55 +02:00
mediatek
dmaengine: Remove dev_err() usage after platform_get_irq()
2019-07-31 20:50:53 +05:30
ppc4xx
qcom
dmaengine: qcom: bam_dma: Fix resource leak
2019-10-18 13:27:58 +05:30
sh
dmaengine updates for v5.4-rc1
2019-09-17 19:04:40 -07:00
ti
dmaengine: ti: edma: fix missed failure handling
2020-01-26 10:01:08 +01:00
xilinx
dmaengine: xilinx_dma: Clear desc_pendingcount in xilinx_dma_reset
2020-01-04 19:16:41 +01:00
acpi-dma.c
dmaengine: acpi: Add kernel doc parameter descriptions
2019-08-21 09:41:27 +05:30
altera-msgdma.c
amba-pl08x.c
dmaengine updates for v5.3-rc1
2019-07-17 09:55:43 -07:00
at_hdmac.c
at_hdmac_regs.h
at_xdmac.c
dmaengine updates for v5.3-rc1
2019-07-17 09:55:43 -07:00
bcm-sba-raid.c
bcm2835-dma.c
dmaengine updates for v5.4-rc1
2019-09-17 19:04:40 -07:00
coh901318.c
dmaengine: coh901318: Fix a double lock bug in dma_tc_handle()
2020-03-12 13:00:30 +01:00
coh901318.h
coh901318_lli.c
dma-axi-dmac.c
dmaengine: axi-dmac: add a check for devm_regmap_init_mmio
2020-02-14 16:34:19 -05:00
dma-jz4780.c
dmaengine: dma-jz4780: Also break descriptor chains on JZ4725B
2020-01-09 10:19:58 +01:00
dmaengine.c
dmaengine: Store module owner in dma_device struct
2020-02-24 08:36:40 +01:00
dmaengine.h
dmatest.c
dmaengine: dmatest: Fix process hang when reading 'wait' parameter
2020-05-06 08:15:16 +02:00
ep93xx_dma.c
fsl-edma-common.c
dmaengine: change alignment of mux_configure32 and fsl_edma_chan_mux
2019-08-20 17:09:34 +05:30
fsl-edma-common.h
dmaengine: fsl-edma: add i.mx7ulp edma2 version support
2019-08-08 17:54:36 +05:30
fsl-edma.c
dmaengine: fsl-edma: implement .device_synchronize callback
2019-08-08 19:01:58 +05:30
fsl-qdma.c
dmaengine: fsl-qdma: fix duplicated argument to &&
2020-02-24 08:36:29 +01:00
fsl_raid.c
fsl_raid.h
fsldma.c
dmaengine: fsldma: Mark expected switch fall-through
2019-08-20 19:42:34 -05:00
fsldma.h
idma64.c
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500
2019-06-19 17:09:55 +02:00
idma64.h
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500
2019-06-19 17:09:55 +02:00
img-mdc-dma.c
imx-dma.c
dmaengine: imx-dma: Mark expected switch fall-through
2019-07-31 20:49:04 +05:30
imx-sdma.c
dmaengine: imx-sdma: Fix the event id check to include RX event for UART6
2020-03-12 13:00:23 +01:00
iop-adma.c
dmaengine updates for v5.4-rc1
2019-09-17 19:04:40 -07:00
iop-adma.h
dma: iop-adma: allow building without platform headers
2019-08-14 15:36:22 +02:00
k3dma.c
dmaengine: k3dma: Avoid null pointer traversal
2020-01-17 19:49:06 +01:00
Kconfig
Main MIPS changes for v5.4:
2019-09-22 09:30:30 -07:00
lpc18xx-dmamux.c
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500
2019-06-19 17:09:55 +02:00
Makefile
dma: Drop JZ4740 driver
2019-07-30 10:41:53 -07:00
mcf-edma.c
dmaengine: fsl-edma: add drvdata for fsl-edma
2019-07-03 13:28:22 +05:30
mic_x100_dma.c
dmaengine updates for v5.3-rc1
2019-07-17 09:55:43 -07:00
mic_x100_dma.h
mmp_pdma.c
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500
2019-06-19 17:09:55 +02:00
mmp_tdma.c
dmaengine updates for v5.3-rc1
2019-07-17 09:55:43 -07:00
moxart-dma.c
mpc512x_dma.c
mv_xor.c
mv_xor.h
mv_xor_v2.c
dmaengine: mv_xor_v2: Fix -Wshift-negative-value
2019-08-20 17:06:36 +05:30
mxs-dma.c
dmaengine updates for v5.3-rc1
2019-07-17 09:55:43 -07:00
nbpfaxi.c
of-dma.c
dmaengine updates for v5.3-rc1
2019-07-17 09:55:43 -07:00
owl-dma.c
pch_dma.c
pl330.c
dmaengine: pl330: use the same attributes when freeing pl330->mcode_cpu
2019-08-08 18:49:43 +05:30
pxa_dma.c
dmaengine updates for v5.3-rc1
2019-07-17 09:55:43 -07:00
s3c24xx-dma.c
dmaengine: Remove dev_err() usage after platform_get_irq()
2019-07-31 20:50:53 +05:30
sa11x0-dma.c
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500
2019-06-19 17:09:55 +02:00
sirf-dma.c
sprd-dma.c
dmaengine: sprd: Fix the possible memory leak issue
2019-10-15 15:47:24 +05:30
st_fdma.c
dmaengine: Remove dev_err() usage after platform_get_irq()
2019-07-31 20:50:53 +05:30
st_fdma.h
ste_dma40.c
dmaengine: ste_dma40: fix unneeded variable warning
2019-07-22 20:58:33 +05:30
ste_dma40_ll.c
ste_dma40_ll.h
stm32-dma.c
dmaengine: stm32-dma: Use struct_size() helper
2019-09-04 10:25:08 +05:30
stm32-dmamux.c
dmaengine: stm32-dmamux: Switch to use device_property_count_u32()
2019-07-29 12:25:21 +05:30
stm32-mdma.c
dmaengine updates for v5.4-rc1
2019-09-17 19:04:40 -07:00
sun4i-dma.c
dmaengine: Remove dev_err() usage after platform_get_irq()
2019-07-31 20:50:53 +05:30
sun6i-dma.c
dmaengine: Remove dev_err() usage after platform_get_irq()
2019-07-31 20:50:53 +05:30
tegra20-apb-dma.c
dmaengine: tegra-apb: Prevent race conditions of tasklet vs free list
2020-03-12 13:00:23 +01:00
tegra210-adma.c
dmaengine: tegra210-adma: fix transfer failure
2019-10-14 12:40:38 +05:30
timb_dma.c
TODO
txx9dmac.c
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500
2019-06-19 17:09:55 +02:00
txx9dmac.h
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500
2019-06-19 17:09:55 +02:00
uniphier-mdmac.c
dmaengine: Remove dev_err() usage after platform_get_irq()
2019-07-31 20:50:53 +05:30
virt-dma.c
dmaengine: virt-dma: Fix access after free in vchan_complete()
2020-01-09 10:20:00 +01:00
virt-dma.h
dmaengine updates for v5.3-rc1
2019-07-17 09:55:43 -07:00
xgene-dma.c
dmaengine: Remove dev_err() usage after platform_get_irq()
2019-07-31 20:50:53 +05:30
zx_dma.c
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500
2019-06-19 17:09:55 +02:00