]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Apr 2025 07:06:51 +0000 (09:06 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Apr 2025 07:06:51 +0000 (09:06 +0200)
added patches:
ntb_perf-delete-duplicate-dmaengine_unmap_put-call-in-perf_copy_chunk.patch

queue-5.10/ntb_perf-delete-duplicate-dmaengine_unmap_put-call-in-perf_copy_chunk.patch [new file with mode: 0644]
queue-5.10/series

diff --git a/queue-5.10/ntb_perf-delete-duplicate-dmaengine_unmap_put-call-in-perf_copy_chunk.patch b/queue-5.10/ntb_perf-delete-duplicate-dmaengine_unmap_put-call-in-perf_copy_chunk.patch
new file mode 100644 (file)
index 0000000..f664c69
--- /dev/null
@@ -0,0 +1,41 @@
+From 4279e72cab31dd3eb8c89591eb9d2affa90ab6aa Mon Sep 17 00:00:00 2001
+From: Markus Elfring <elfring@users.sourceforge.net>
+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 <elfring@users.sourceforge.net>
+
+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 <elfring@users.sourceforge.net>
+Signed-off-by: Jon Mason <jdmason@kudzu.us>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ 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
+@@ -839,10 +839,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);
index f3cb182957ae982867c4c86b1304bdebd44713fd..a732ecd4d7545ab051dd7b14e2a4424726ed1dae 100644 (file)
@@ -208,3 +208,4 @@ tty-serial-fsl_lpuart-use-uartmodir-register-bits-fo.patch
 tty-serial-fsl_lpuart-disable-transmitter-before-cha.patch
 drm-amd-pm-fix-negative-array-index-read.patch
 drm-amd-display-skip-inactive-planes-within-modesupportandsystemconfiguration.patch
+ntb_perf-delete-duplicate-dmaengine_unmap_put-call-in-perf_copy_chunk.patch