patch 'dmadev: fix potential null pointer access' has been queued to stable release 23.11.3
Xueming Li
xuemingl at nvidia.com
Mon Nov 11 07:28:43 CET 2024
Hi,
FYI, your patch has been queued to stable release 23.11.3
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/30/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging
This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=43802f5b3729302977db17e78dbeac7ac3a09353
Thanks.
Xueming Li <xuemingl at nvidia.com>
---
>From 43802f5b3729302977db17e78dbeac7ac3a09353 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
Cc: Xueming Li <xuemingl at nvidia.com>
[ 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 5093c6e38b..a2e52cc8ff 100644
--- a/lib/dmadev/rte_dmadev.c
+++ b/lib/dmadev/rte_dmadev.c
@@ -731,7 +731,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.34.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2024-11-11 14:23:10.548093632 +0800
+++ 0117-dmadev-fix-potential-null-pointer-access.patch 2024-11-11 14:23:05.352192835 +0800
@@ -1 +1 @@
-From e5389d427ec43ab805d0a1caed89b63656fd7fde Mon Sep 17 00:00:00 2001
+From 43802f5b3729302977db17e78dbeac7ac3a09353 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit e5389d427ec43ab805d0a1caed89b63656fd7fde ]
@@ -11 +13,0 @@
-Cc: stable at dpdk.org
@@ -19 +21 @@
-index 845727210f..60c3d8ebf6 100644
+index 5093c6e38b..a2e52cc8ff 100644
@@ -22 +24 @@
-@@ -741,7 +741,7 @@ rte_dma_vchan_status(int16_t dev_id, uint16_t vchan, enum rte_dma_vchan_status *
+@@ -731,7 +731,7 @@ rte_dma_vchan_status(int16_t dev_id, uint16_t vchan, enum rte_dma_vchan_status *
More information about the stable
mailing list