From: Greg Kroah-Hartman Date: Tue, 8 Apr 2025 07:06:26 +0000 (+0200) Subject: 5.4-stable patches X-Git-Tag: v5.4.292~61 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=038286a28fb357d9be904a9ad3f946e6ec809f56;p=thirdparty%2Fkernel%2Fstable-queue.git 5.4-stable patches added patches: ntb_perf-delete-duplicate-dmaengine_unmap_put-call-in-perf_copy_chunk.patch --- diff --git a/queue-5.4/ntb_perf-delete-duplicate-dmaengine_unmap_put-call-in-perf_copy_chunk.patch b/queue-5.4/ntb_perf-delete-duplicate-dmaengine_unmap_put-call-in-perf_copy_chunk.patch new file mode 100644 index 0000000000..5069fba980 --- /dev/null +++ b/queue-5.4/ntb_perf-delete-duplicate-dmaengine_unmap_put-call-in-perf_copy_chunk.patch @@ -0,0 +1,41 @@ +From 4279e72cab31dd3eb8c89591eb9d2affa90ab6aa Mon Sep 17 00:00:00 2001 +From: Markus Elfring +Date: Mon, 23 Sep 2024 10:38:11 +0200 +Subject: ntb_perf: Delete duplicate dmaengine_unmap_put() call in perf_copy_chunk() +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Markus Elfring + +commit 4279e72cab31dd3eb8c89591eb9d2affa90ab6aa upstream. + +The function call “dmaengine_unmap_put(unmap)” was used in an if branch. +The same call was immediately triggered by a subsequent goto statement. +Thus avoid such a call repetition. + +This issue was detected by using the Coccinelle software. + +Fixes: 5648e56d03fa ("NTB: ntb_perf: Add full multi-port NTB API support") +Cc: stable@vger.kernel.org +Signed-off-by: Markus Elfring +Signed-off-by: Jon Mason +Signed-off-by: Greg Kroah-Hartman +--- + drivers/ntb/test/ntb_perf.c | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +--- a/drivers/ntb/test/ntb_perf.c ++++ b/drivers/ntb/test/ntb_perf.c +@@ -838,10 +838,8 @@ static int perf_copy_chunk(struct perf_t + dma_set_unmap(tx, unmap); + + ret = dma_submit_error(dmaengine_submit(tx)); +- if (ret) { +- dmaengine_unmap_put(unmap); ++ if (ret) + goto err_free_resource; +- } + + dmaengine_unmap_put(unmap); + diff --git a/queue-5.4/series b/queue-5.4/series index d0562aff9d..5cabc72625 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -144,3 +144,4 @@ ipv6-fix-omitted-netlink-attributes-when-using-rtext.patch net-dsa-mv88e6xxx-propperly-shutdown-ppu-re-enable-t.patch arcnet-add-null-check-in-com20020pci_probe.patch can-flexcan-only-change-can-state-when-link-up-in-sy.patch +ntb_perf-delete-duplicate-dmaengine_unmap_put-call-in-perf_copy_chunk.patch