From 2f579469b636ca1f11ca3b2447c8c76310cc6084 Mon Sep 17 00:00:00 2001 From: Changpeng Liu Date: Wed, 3 Mar 2021 20:03:03 -0500 Subject: [PATCH] nvme/tcp: pass correct parameter to nvme_tcp_qpair_send_h2c_term_req_complete Previously the callback parameter for this function is NULL, this will cause segment fault, so pass the correct parameter here. Fix #1817 Change-Id: Ie768b7bf4a72862d16a44742ab3032803d0939a2 Signed-off-by: Changpeng Liu Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6690 Tested-by: SPDK CI Jenkins Reviewed-by: Shuhei Matsumoto Reviewed-by: Aleksey Marchuk Reviewed-by: Ben Walker Reviewed-by: Community-CI: Mellanox Build Bot --- lib/nvme/nvme_tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nvme/nvme_tcp.c b/lib/nvme/nvme_tcp.c index 16df4c664..1532479f1 100644 --- a/lib/nvme/nvme_tcp.c +++ b/lib/nvme/nvme_tcp.c @@ -778,7 +778,7 @@ nvme_tcp_qpair_send_h2c_term_req(struct nvme_tcp_qpair *tqpair, struct nvme_tcp_ /* Contain the header len of the wrong received pdu */ h2c_term_req->common.plen = h2c_term_req->common.hlen + copy_len; nvme_tcp_qpair_set_recv_state(tqpair, NVME_TCP_PDU_RECV_STATE_ERROR); - nvme_tcp_qpair_write_pdu(tqpair, rsp_pdu, nvme_tcp_qpair_send_h2c_term_req_complete, NULL); + nvme_tcp_qpair_write_pdu(tqpair, rsp_pdu, nvme_tcp_qpair_send_h2c_term_req_complete, tqpair); }