]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
dmaengine: dmatest: Fix dmatest waiting less when interrupted
authorVinicius Costa Gomes <vinicius.gomes@intel.com>
Wed, 5 Mar 2025 23:00:06 +0000 (15:00 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 May 2025 05:39:28 +0000 (07:39 +0200)
commita33bcea3ab9696b0a451383378dd7c55cd7481ff
tree57be8bc1921bd27a20cbfebfd754d62896a86424
parentf34551a4874206ec6c8bd9bdd71a954b311c6461
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>
drivers/dma/dmatest.c