patch 'dmadev: fix potential null pointer access' has been queued to stable release 22.11.7

luca.boccassi at gmail.com luca.boccassi at gmail.com
Wed Oct 23 23:16:56 CEST 2024


Hi,

FYI, your patch has been queued to stable release 22.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 10/25/24. 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/45655bbf5920f832cc6dd7e6af49ecc64bf99afd

Thanks.

Luca Boccassi

---
>From 45655bbf5920f832cc6dd7e6af49ecc64bf99afd Mon Sep 17 00:00:00 2001
From: Chengwen Feng <fengchengwen at huawei.com>
Date: Sat, 12 Oct 2024 17:17:34 +0800
Subject: [PATCH] dmadev: fix potential null pointer access

[ upstream commit e5389d427ec43ab805d0a1caed89b63656fd7fde ]

When rte_dma_vchan_status(dev_id, vchan, NULL) is called, a null pointer
access is triggered.
This patch adds the null pointer checker.

Fixes: 5e0f85912754 ("dmadev: add channel status check for testing use")

Signed-off-by: Chengwen Feng <fengchengwen at huawei.com>
---
 lib/dmadev/rte_dmadev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/dmadev/rte_dmadev.c b/lib/dmadev/rte_dmadev.c
index d94f85ea9a..2091db98bd 100644
--- a/lib/dmadev/rte_dmadev.c
+++ b/lib/dmadev/rte_dmadev.c
@@ -715,7 +715,7 @@ rte_dma_vchan_status(int16_t dev_id, uint16_t vchan, enum rte_dma_vchan_status *
 {
 	struct rte_dma_dev *dev = &rte_dma_devices[dev_id];
 
-	if (!rte_dma_is_valid(dev_id))
+	if (!rte_dma_is_valid(dev_id) || status == NULL)
 		return -EINVAL;
 
 	if (vchan >= dev->data->dev_conf.nb_vchans) {
-- 
2.45.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-10-23 22:16:43.409268515 +0100
+++ 0076-dmadev-fix-potential-null-pointer-access.patch	2024-10-23 22:16:40.555944919 +0100
@@ -1 +1 @@
-From e5389d427ec43ab805d0a1caed89b63656fd7fde Mon Sep 17 00:00:00 2001
+From 45655bbf5920f832cc6dd7e6af49ecc64bf99afd Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e5389d427ec43ab805d0a1caed89b63656fd7fde ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org
@@ -19 +20 @@
-index 845727210f..60c3d8ebf6 100644
+index d94f85ea9a..2091db98bd 100644
@@ -22 +23 @@
-@@ -741,7 +741,7 @@ rte_dma_vchan_status(int16_t dev_id, uint16_t vchan, enum rte_dma_vchan_status *
+@@ -715,7 +715,7 @@ rte_dma_vchan_status(int16_t dev_id, uint16_t vchan, enum rte_dma_vchan_status *


More information about the stable mailing list