代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/dpdk 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 6963b0641d446209018f0fdc6cd773c92b3f4612 Mon Sep 17 00:00:00 2001
From: Chengwen Feng <[email protected]>
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 <[email protected]>
---
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
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。