patch 'dma/odm: fix zero-length DMA transfer' has been queued to stable release 24.11.7
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Thu Jun 11 15:20:30 CEST 2026
Hi,
FYI, your patch has been queued to stable release 24.11.7
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/13/26. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/b8c5df2ce1171d41e400be22a97b74ceec7d8849
Thanks.
Luca Boccassi
---
>From b8c5df2ce1171d41e400be22a97b74ceec7d8849 Mon Sep 17 00:00:00 2001
From: Shijith Thotton <sthotton at marvell.com>
Date: Mon, 1 Jun 2026 15:45:59 +0530
Subject: [PATCH] dma/odm: fix zero-length DMA transfer
[ upstream commit daa5308577a16bb412c6ebd899a60e776fb31996 ]
Add validation to reject zero-length DMA operations early
with -EINVAL, preventing queue disable.
Fixes: c57d26fa61cc ("dma/odm: add copy ops")
Signed-off-by: Shijith Thotton <sthotton at marvell.com>
---
drivers/dma/odm/odm_dmadev.c | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/drivers/dma/odm/odm_dmadev.c b/drivers/dma/odm/odm_dmadev.c
index a2f4ed9a8e..bb334e19cc 100644
--- a/drivers/dma/odm/odm_dmadev.c
+++ b/drivers/dma/odm/odm_dmadev.c
@@ -108,6 +108,9 @@ odm_dmadev_copy(void *dev_private, uint16_t vchan, rte_iova_t src, rte_iova_t ds
vq = &odm->vq[vchan];
+ if (unlikely(!length))
+ return -EINVAL;
+
h = length;
h |= ((uint64_t)length << 32);
@@ -259,14 +262,20 @@ odm_dmadev_copy_sg(void *dev_private, uint16_t vchan, const struct rte_dma_sge *
pending_submit_len = vq->pending_submit_len;
pending_submit_cnt = vq->pending_submit_cnt;
- if (unlikely(nb_src > 4 || nb_dst > 4))
+ if (unlikely(!nb_src || nb_src > 4 || !nb_dst || nb_dst > 4))
return -EINVAL;
- for (i = 0; i < nb_src; i++)
+ for (i = 0; i < nb_src; i++) {
+ if (unlikely(!src[i].length))
+ return -EINVAL;
s_sz += src[i].length;
+ }
- for (i = 0; i < nb_dst; i++)
+ for (i = 0; i < nb_dst; i++) {
+ if (unlikely(!dst[i].length))
+ return -EINVAL;
d_sz += dst[i].length;
+ }
if (s_sz != d_sz)
return -EINVAL;
@@ -339,6 +348,9 @@ odm_dmadev_fill(void *dev_private, uint16_t vchan, uint64_t pattern, rte_iova_t
.s.nlst = 1,
};
+ if (unlikely(!length))
+ return -EINVAL;
+
h = (uint64_t)length;
switch (pattern) {
--
2.47.3
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-06-11 14:20:04.518431806 +0100
+++ 0081-dma-odm-fix-zero-length-DMA-transfer.patch 2026-06-11 14:20:01.314748413 +0100
@@ -1 +1 @@
-From daa5308577a16bb412c6ebd899a60e776fb31996 Mon Sep 17 00:00:00 2001
+From b8c5df2ce1171d41e400be22a97b74ceec7d8849 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit daa5308577a16bb412c6ebd899a60e776fb31996 ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org
@@ -18 +19 @@
-index 0211133bd4..7488b960fd 100644
+index a2f4ed9a8e..bb334e19cc 100644
@@ -21 +22,2 @@
-@@ -110,6 +110,9 @@ odm_dmadev_copy(void *dev_private, uint16_t vchan, rte_iova_t src, rte_iova_t ds
+@@ -108,6 +108,9 @@ odm_dmadev_copy(void *dev_private, uint16_t vchan, rte_iova_t src, rte_iova_t ds
+
@@ -23 +24,0 @@
- hdr.s.xtype = vq->xtype;
@@ -31 +32 @@
-@@ -262,14 +265,20 @@ odm_dmadev_copy_sg(void *dev_private, uint16_t vchan, const struct rte_dma_sge *
+@@ -259,14 +262,20 @@ odm_dmadev_copy_sg(void *dev_private, uint16_t vchan, const struct rte_dma_sge *
@@ -55 +56 @@
-@@ -342,6 +351,9 @@ odm_dmadev_fill(void *dev_private, uint16_t vchan, uint64_t pattern, rte_iova_t
+@@ -339,6 +348,9 @@ odm_dmadev_fill(void *dev_private, uint16_t vchan, uint64_t pattern, rte_iova_t
More information about the stable
mailing list