From 3c4dcb41352deb55b573f97a88adac5f8aa845d5 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sat, 13 Apr 2019 22:53:24 +0000 Subject: [PATCH] qla2x00t-32gbit: Avoid corrupting vha->plogi_ack_list git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8191 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- qla2x00t-32gbit/qla_os.c | 8 ++++++-- qla2x00t-32gbit/qla_target.c | 4 +++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/qla2x00t-32gbit/qla_os.c b/qla2x00t-32gbit/qla_os.c index e6f47318c..7f0cfb78d 100644 --- a/qla2x00t-32gbit/qla_os.c +++ b/qla2x00t-32gbit/qla_os.c @@ -5130,8 +5130,10 @@ void qla24xx_create_new_sess(struct scsi_qla_host *vha, struct qla_work_evt *e) "%s %s mem alloc fail.\n", __func__, wwn_to_str(e->u.new_sess.port_name)); - if (pla) + if (pla) { + list_del(&pla->list); kmem_cache_free(qla_tgt_plogi_cachep, pla); + } return; } @@ -5241,8 +5243,10 @@ void qla24xx_create_new_sess(struct scsi_qla_host *vha, struct qla_work_evt *e) if (free_fcport) { qla2x00_free_fcport(fcport); - if (pla) + if (pla) { + list_del(&pla->list); kmem_cache_free(qla_tgt_plogi_cachep, pla); + } } } diff --git a/qla2x00t-32gbit/qla_target.c b/qla2x00t-32gbit/qla_target.c index 6de4ec642..d6331a5e6 100644 --- a/qla2x00t-32gbit/qla_target.c +++ b/qla2x00t-32gbit/qla_target.c @@ -4933,8 +4933,10 @@ static int qlt_handle_login(struct scsi_qla_host *vha, __func__, wwn_to_str(sess->port_name), sec); } - if (!conflict_sess) + if (!conflict_sess) { + list_del(&pla->list); kmem_cache_free(qla_tgt_plogi_cachep, pla); + } qlt_send_term_imm_notif(vha, iocb, 1); goto out;