代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/rdma-core 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 884663cd803e3781aec9c45f7fc0145b6a2b4539 Mon Sep 17 00:00:00 2001
From: Luoyouming <luoyouming@huawei.com>
Date: Mon, 27 Nov 2023 16:39:49 +0800
Subject: [PATCH 72/75] libhns: Add input parameter check for
hnsdv_query_device()
driver inclusion
category: cleanup
bugzilla: https://gitee.com/src-openeuler/rdma-core/issues/I8J2W9?from=project-issue
--------------------------------------------------------------------------
Add null pointer check for pointer parameter.
Signed-off-by: Luoyouming <luoyouming@huawei.com>
---
providers/hns/hns_roce_u_verbs.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/providers/hns/hns_roce_u_verbs.c b/providers/hns/hns_roce_u_verbs.c
index c906632..e597e93 100644
--- a/providers/hns/hns_roce_u_verbs.c
+++ b/providers/hns/hns_roce_u_verbs.c
@@ -126,15 +126,16 @@ int hnsdv_query_device(struct ibv_context *context,
struct hnsdv_context *attrs_out)
{
struct hns_roce_context *ctx = context ? to_hr_ctx(context) : NULL;
- struct hns_roce_device *hr_dev = to_hr_dev(context->device);
+ struct hns_roce_device *hr_dev;
if (!ctx || !attrs_out)
return EINVAL;
- if (!hr_dev) {
+ if (!context->device && !is_hns_dev(context->device)) {
verbs_err(verbs_get_ctx(context), "not a HNS RoCE device!\n");
return EOPNOTSUPP;
}
+ hr_dev = to_hr_dev(context->device);
memset(attrs_out, 0, sizeof(*attrs_out));
--
2.25.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。