summaryrefslogtreecommitdiff
path: root/drivers/dma
diff options
context:
space:
mode:
authorVinicius Costa Gomes <vinicius.gomes@intel.com>2025-03-05 15:00:06 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-05-02 07:50:55 +0200
commit2c6a11eaec650c3c3fde42c54edc375bad5f4aac (patch)
tree5b5091322b0b92376d1ad18f3e8e2b218b2e2112 /drivers/dma
parent5be9407b41eae20eef9140f5cfbfcbc3d01aaf45 (diff)
downloadlinux-2c6a11eaec650c3c3fde42c54edc375bad5f4aac.tar.gz
linux-2c6a11eaec650c3c3fde42c54edc375bad5f4aac.tar.bz2
linux-2c6a11eaec650c3c3fde42c54edc375bad5f4aac.zip
dmaengine: dmatest: Fix dmatest waiting less when interrupted
[ Upstream commit e87ca16e99118ab4e130a41bdf12abbf6a87656c ] Change the "wait for operation finish" logic to take interrupts into account. When using dmatest with idxd DMA engine, it's possible that during longer tests, the interrupt notifying the finish of an operation happens during wait_event_freezable_timeout(), which causes dmatest to cleanup all the resources, some of which might still be in use. This fix ensures that the wait logic correctly handles interrupts, preventing premature cleanup of resources. Reported-by: kernel test robot <oliver.sang@intel.com> Closes: https://lore.kernel.org/oe-lkp/202502171134.8c403348-lkp@intel.com Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com> Reviewed-by: Dave Jiang <dave.jiang@intel.com> Link: https://lore.kernel.org/r/20250305230007.590178-1-vinicius.gomes@intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/dmatest.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c
index ffe621695e47..78b8a97b2363 100644
--- a/drivers/dma/dmatest.c
+++ b/drivers/dma/dmatest.c
@@ -827,9 +827,9 @@ static int dmatest_func(void *data)
} else {
dma_async_issue_pending(chan);
- wait_event_freezable_timeout(thread->done_wait,
- done->done,
- msecs_to_jiffies(params->timeout));
+ wait_event_timeout(thread->done_wait,
+ done->done,
+ msecs_to_jiffies(params->timeout));
status = dma_async_is_tx_complete(chan, cookie, NULL,
NULL);