Sync some patchs from upstreaming, includind some bugfixes, hns3 pmd flow rule priority feature, hns3 pmd outer VLAN flow match feature, and support dump reigser names and filter. This patch set is modified as follows: - net/hns3: fix cannot fully use hardware flow director table - net/hns3: fix error code for repeatedly create counter - net/hns3: support flow rule priority - common/nfp: use new kvargs process API - net/tap: use new kvargs process API - net/sfc: use new kvargs process API - kvargs: rework process API - net/hns3: fix variable type - net/hns3: fix pointer offset - net/hns3: fix error log - net/hns3: support filtering registers by module names - net/hns3: support reporting names of registers - net/hns3: refactor register dump - net/hns3: remove separators between register module - net/hns3: fix dump counter of registers - net/hns3: remove some basic address dump - telemetry: register command with private argument - ethdev: fix race on ports in telemetry endpoints - ethdev: add telemetry command for registers - ethdev: add report of register names and filter - net/hns3: support outer VLAN flow match - net/hns3: register VLAN flow match mode parameter - net/hns3: support general tunnel flow match - net/hns3: restrict tunnel flow rule to one header - net/hns3: remove ROH devices - net/hns3: dump queue head and tail pointer info - dmadev: fix potential null pointer access - net/hns3: verify reset type from firmware - ethdev: verify queue ID in Tx done cleanup Signed-off-by: Dengdui Huang <huangdengdui@huawei.com> (cherry picked from commit a1c828e1eb9cf716187d2a7656023e95bdce9b55)
36 lines
1.1 KiB
Diff
36 lines
1.1 KiB
Diff
From 6963b0641d446209018f0fdc6cd773c92b3f4612 Mon Sep 17 00:00:00 2001
|
|
From: Chengwen Feng <fengchengwen@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")
|
|
Cc: stable@dpdk.org
|
|
|
|
Signed-off-by: Chengwen Feng <fengchengwen@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 7729519..8a010c4 100644
|
|
--- a/lib/dmadev/rte_dmadev.c
|
|
+++ b/lib/dmadev/rte_dmadev.c
|
|
@@ -722,7 +722,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.33.0
|
|
|