Unverified Commit fd40ac71 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!12642 RDMA/rtrs-clt: Reset cid to con_num - 1 to stay in bounds

parents 945c3f08 32cd6e7d
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -2231,6 +2231,12 @@ static int init_conns(struct rtrs_clt_sess *sess)
			goto destroy;
		}
	}

	/*
	 * Set the cid to con_num - 1, since if we fail later, we want to stay in bounds.
	 */
	cid = sess->s.con_num - 1;

	err = alloc_sess_reqs(sess);
	if (err)
		goto destroy;