From: Greg Kroah-Hartman Date: Mon, 19 May 2025 12:32:38 +0000 (+0200) Subject: 5.4-stable patches X-Git-Tag: v5.15.184~54 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6d95a8dc822565f6b185304101cc9c7d52be3bf6;p=thirdparty%2Fkernel%2Fstable-queue.git 5.4-stable patches added patches: dmaengine-revert-dmaengine-dmatest-fix-dmatest-waiting-less-when-interrupted.patch --- diff --git a/queue-5.4/dmaengine-revert-dmaengine-dmatest-fix-dmatest-waiting-less-when-interrupted.patch b/queue-5.4/dmaengine-revert-dmaengine-dmatest-fix-dmatest-waiting-less-when-interrupted.patch new file mode 100644 index 0000000000..5c9ae67bcf --- /dev/null +++ b/queue-5.4/dmaengine-revert-dmaengine-dmatest-fix-dmatest-waiting-less-when-interrupted.patch @@ -0,0 +1,51 @@ +From df180e65305f8c1e020d54bfc2132349fd693de1 Mon Sep 17 00:00:00 2001 +From: Nathan Lynch +Date: Thu, 3 Apr 2025 11:24:19 -0500 +Subject: dmaengine: Revert "dmaengine: dmatest: Fix dmatest waiting less when interrupted" + +From: Nathan Lynch + +commit df180e65305f8c1e020d54bfc2132349fd693de1 upstream. + +Several issues with this change: + +* The analysis is flawed and it's unclear what problem is being + fixed. There is no difference between wait_event_freezable_timeout() + and wait_event_timeout() with respect to device interrupts. And of + course "the interrupt notifying the finish of an operation happens + during wait_event_freezable_timeout()" -- that's how it's supposed + to work. + +* The link at the "Closes:" tag appears to be an unrelated + use-after-free in idxd. + +* It introduces a regression: dmatest threads are meant to be + freezable and this change breaks that. + +See discussion here: +https://lore.kernel.org/dmaengine/878qpa13fe.fsf@AUSNATLYNCH.amd.com/ + +Fixes: e87ca16e9911 ("dmaengine: dmatest: Fix dmatest waiting less when interrupted") +Signed-off-by: Nathan Lynch +Link: https://lore.kernel.org/r/20250403-dmaengine-dmatest-revert-waiting-less-v1-1-8227c5a3d7c8@amd.com +Signed-off-by: Vinod Koul +Signed-off-by: Greg Kroah-Hartman +--- + drivers/dma/dmatest.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/drivers/dma/dmatest.c ++++ b/drivers/dma/dmatest.c +@@ -809,9 +809,9 @@ static int dmatest_func(void *data) + } else { + dma_async_issue_pending(chan); + +- wait_event_timeout(thread->done_wait, +- done->done, +- msecs_to_jiffies(params->timeout)); ++ wait_event_freezable_timeout(thread->done_wait, ++ done->done, ++ msecs_to_jiffies(params->timeout)); + + status = dma_async_is_tx_complete(chan, cookie, NULL, + NULL); diff --git a/queue-5.4/series b/queue-5.4/series index e501a98372..b53e91b18b 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -74,3 +74,4 @@ alsa-sh-snd_aica-should-depend-on-sh_dma_api.patch qlcnic-fix-memory-leak-in-qlcnic_sriov_channel_cfg_c.patch nfsv4-pnfs-pnfs_set_layout_stateid-should-update-the.patch nfsv4-pnfs-reset-the-layout-state-after-a-layoutretu.patch +dmaengine-revert-dmaengine-dmatest-fix-dmatest-waiting-less-when-interrupted.patch