From b35aceb8cfd6ee01176fa5f1abe1d9a24888653b Mon Sep 17 00:00:00 2001 From: Jim Harris Date: Thu, 17 Nov 2022 02:52:16 +0000 Subject: [PATCH] iscsi: unregister login_timer when destroying connection If a connection is established and we receive a bad PDU before successful login, the login_timer would not get unregistered. So ensure the login_timer is always unregistered in _iscsi_conn_destruct(). Found with Calsoft tests during new spdk_thread_exit() assertion testing. Lack of unregistration would result in its associated spdk_thread being unable to exit cleanly due to the unexpired timer. Signed-off-by: Jim Harris Change-Id: I79d427512f7829ad76bf89155e0e14c7bce3a7d7 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15499 Tested-by: SPDK CI Jenkins Reviewed-by: Changpeng Liu Reviewed-by: Aleksey Marchuk Reviewed-by: Tomasz Zawadzki --- lib/iscsi/conn.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/iscsi/conn.c b/lib/iscsi/conn.c index 5a5738605..ff59943d1 100644 --- a/lib/iscsi/conn.c +++ b/lib/iscsi/conn.c @@ -612,6 +612,7 @@ _iscsi_conn_destruct(struct spdk_iscsi_conn *conn) iscsi_clear_all_transfer_task(conn, NULL, NULL); spdk_poller_unregister(&conn->logout_request_timer); spdk_poller_unregister(&conn->logout_timer); + spdk_poller_unregister(&conn->login_timer); rc = iscsi_conn_free_tasks(conn); if (rc < 0) {