Commit 7734777a authored by Lance Hartmann's avatar Lance Hartmann Committed by Jim Harris
Browse files

iscsi: Handle spdk_get_pdu() failure in spdk_iscsi_op_logout()



Prepares spdk_iscsi_op_logout() to handle the case where
spdk_get_pdu() will return NULL in a future patch instead
of abort()'ing.

Change-Id: I31f854741906023c734151e3b00b939cdafb2ec4
Signed-off-by: default avatarLance Hartmann <lance.hartmann@oracle.com>
Reviewed-on: https://review.gerrithub.io/403864


Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent a3793969
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -2527,6 +2527,9 @@ spdk_iscsi_op_logout(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu)

	/* response PDU */
	rsp_pdu = spdk_get_pdu();
	if (rsp_pdu == NULL) {
		return SPDK_ISCSI_CONNECTION_FATAL;
	}
	rsph = (struct iscsi_bhs_logout_resp *)&rsp_pdu->bhs;
	rsp_pdu->data = NULL;
	rsph->opcode = ISCSI_OP_LOGOUT_RSP;