From 9cd53028103f562629bd12548b242353128b0283 Mon Sep 17 00:00:00 2001 From: Tomasz Kulasek Date: Tue, 5 Nov 2019 12:55:47 +0100 Subject: [PATCH] lib/nvme: fix do not use external_io_msg_qpair after free Signed-off-by: Tomasz Kulasek Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473282 (master) (cherry picked from commit 53184430a5c8485fd4ad6d7000801d8b45ac0b52) Change-Id: I20ef8303c2fae6abf43d15ebb025ea368c0dfd67 Signed-off-by: Tomasz Zawadzki Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478585 Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Shuhei Matsumoto Reviewed-by: Alexey Marchuk --- lib/nvme/nvme_io_msg.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/nvme/nvme_io_msg.c b/lib/nvme/nvme_io_msg.c index 80df14615a..c224da9797 100644 --- a/lib/nvme/nvme_io_msg.c +++ b/lib/nvme/nvme_io_msg.c @@ -166,6 +166,7 @@ nvme_io_msg_ctrlr_stop(struct spdk_nvme_ctrlr *ctrlr, struct nvme_io_msg_produce if (ctrlr->external_io_msgs_qpair) { spdk_nvme_ctrlr_free_io_qpair(ctrlr->external_io_msgs_qpair); + ctrlr->external_io_msgs_qpair = NULL; } pthread_mutex_destroy(&ctrlr->external_io_msgs_lock);