代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/rdma-core 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From e20de83892bcba8e8944cbf83e8acc9192d514bb Mon Sep 17 00:00:00 2001
From: Chengchang Tang <tangchengchang@huawei.com>
Date: Mon, 3 Jul 2023 15:22:57 +0800
Subject: [PATCH 2/2] libhns: Fix reference to uninitialized cq pointer
mainline inclusion
from mainline-v47.0
commit e850ebe1570c06990cc60e96d0085d5d2a1cfcaa
category: bugfix
bugzilla: https://gitee.com/src-openeuler/rdma-core/issues/I7NTLE
CVE: NA
Reference: https://github.com/linux-rdma/rdma-core/commit/e850ebe1570c06990cc60e96d0085d5d2a1cfcaa
----------------------------------------------------------------------
In cases such as using XRC and SRQ where RQs are not created, the recv_cq
pointer will not be initailized, and thus the unsupported post recv
function should return before referencing the recv_cq pointer.
Fixes: 4ea9a4f77ac8 ("libhns: Remove unnecessary QP checks")
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com>
Signed-off-by: Juan Zhou <zhoujuan51@h-partners.com>
---
providers/hns/hns_roce_u_hw_v2.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/providers/hns/hns_roce_u_hw_v2.c b/providers/hns/hns_roce_u_hw_v2.c
index 688eff8..9238fe5 100644
--- a/providers/hns/hns_roce_u_hw_v2.c
+++ b/providers/hns/hns_roce_u_hw_v2.c
@@ -1599,15 +1599,15 @@ static int hns_roce_u_v2_post_recv(struct ibv_qp *ibvqp, struct ibv_recv_wr *wr,
max_sge = qp->rq.max_gs - qp->rq.rsv_sge;
for (nreq = 0; wr; ++nreq, wr = wr->next) {
- if (hns_roce_v2_wq_overflow(&qp->rq, nreq,
- to_hr_cq(qp->verbs_qp.qp.recv_cq))) {
- ret = ENOMEM;
+ if (wr->num_sge > max_sge) {
+ ret = max_sge > 0 ? EINVAL : EOPNOTSUPP;
*bad_wr = wr;
goto out;
}
- if (wr->num_sge > max_sge) {
- ret = EINVAL;
+ if (hns_roce_v2_wq_overflow(&qp->rq, nreq,
+ to_hr_cq(qp->verbs_qp.qp.recv_cq))) {
+ ret = ENOMEM;
*bad_wr = wr;
goto out;
}
--
2.25.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。