Commit 78b69710 authored by Ziye Yang's avatar Ziye Yang Committed by Daniel Verkamp
Browse files

nvmf: Make tx_desc free correct in nvmf_recv



Should set tx_desc=NULL here. If not,When
nvmf_post_rdma_recv(conn, rx_desc) fails,
we would make tx_desc deactive again, and
this is wrong.

Change-Id: Ieabc7e3864b7f124b003d052f66ab8799a1d632e
Signed-off-by: default avatarZiye Yang <ziye.yang@intel.com>
parent 8be572ef
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1062,6 +1062,7 @@ static int nvmf_recv(struct spdk_nvmf_conn *conn, struct ibv_wc *wc)
	if (ret == 1) {
		tx_desc->rx_desc = NULL;
		nvmf_deactive_tx_desc(tx_desc);
		tx_desc = NULL;
		if (nvmf_post_rdma_recv(conn, rx_desc)) {
			SPDK_ERRLOG("Unable to re-post aq rx descriptor\n");
			goto recv_error;