Commit 9e9da467 authored by MengjinWu's avatar MengjinWu Committed by Tomasz Zawadzki
Browse files

nvmf/tcp: fix async bugs when ddgst enalbed



If host disconnect the connection when fabric commands are offload to
DSA, there will be use-after-free problems.

Now, disable the offload of fabrics command.

Fix issue 2828

Signed-off-by: default avatarMengjinWu <mengjin.wu@intel.com>
Change-Id: I669b01728e1ad275b7b121d47141bdf3fe5f7d9f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15992


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
parent 941cf96d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1909,7 +1909,8 @@ nvmf_tcp_pdu_payload_handle(struct spdk_nvmf_tcp_qpair *tqpair, struct nvme_tcp_
	SPDK_DEBUGLOG(nvmf_tcp, "enter\n");
	/* check data digest if need */
	if (pdu->ddgst_enable) {
		if (!pdu->dif_ctx && tqpair->group && (pdu->data_len % SPDK_NVME_TCP_DIGEST_ALIGNMENT == 0)) {
		if (tqpair->qpair.qid != 0 && !pdu->dif_ctx && tqpair->group &&
		    (pdu->data_len % SPDK_NVME_TCP_DIGEST_ALIGNMENT == 0)) {
			rc = spdk_accel_submit_crc32cv(tqpair->group->accel_channel, &pdu->data_digest_crc32, pdu->data_iov,
						       pdu->data_iovcnt, 0, data_crc32_calc_done, pdu);
			if (spdk_likely(rc == 0)) {