Commit 6c07ca54 authored by Lance Hartmann's avatar Lance Hartmann Committed by Jim Harris
Browse files

iscsi: Handle spdk_get_pdu() failure in spdk_iscsi_op_nopout()



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

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


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 7734777a
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -3529,6 +3529,10 @@ spdk_iscsi_op_nopout(struct spdk_iscsi_conn *conn, struct spdk_iscsi_pdu *pdu)

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