diff --git a/providers/hns/hns_roce_u_hw_v2.c b/providers/hns/hns_roce_u_hw_v2.c index 19080a500..64e48eea6 100644 --- a/providers/hns/hns_roce_u_hw_v2.c +++ b/providers/hns/hns_roce_u_hw_v2.c @@ -2524,6 +2524,7 @@ static void wr_start(struct ibv_qp_ex *ibv_qp) if (state == IBV_QPS_RESET || state == IBV_QPS_INIT || state == IBV_QPS_RTR) { + pthread_spin_lock(&qp->sq.lock); qp->err = EINVAL; return; }