From: Mike Christie <michael.christie@oracle.com>
To: Li Lingfeng <lilingfeng3@huawei.com>,
lduncan@suse.com, cleech@redhat.com, njavali@marvell.com,
mrangankar@marvell.com, GR-QLogic-Storage-Upstream@marvell.com,
martin.petersen@oracle.com, jejb@linux.ibm.com,
James.Bottomley@HansenPartnership.com
Cc: open-iscsi@googlegroups.com, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org, yukuai1@huaweicloud.com,
houtao1@huawei.com, yi.zhang@huawei.com, yangerkun@huawei.com,
chengzhihao1@huawei.com, lilingfeng@huaweicloud.com
Subject: Re: [PATCH] Revert "scsi: iscsi: Fix HW conn removal use after free"
Date: Thu, 17 Jul 2025 15:01:11 -0500 [thread overview]
Message-ID: <653eaa6f-4e85-43af-a13b-906e34a2e517@oracle.com> (raw)
In-Reply-To: <20250715073926.3529456-1-lilingfeng3@huawei.com>
On 7/15/25 2:39 AM, Li Lingfeng wrote:
> This reverts commit c577ab7ba5f3bf9062db8a58b6e89d4fe370447e.
>
> The invocation of iscsi_put_conn() in iscsi_iter_destory_conn_fn() is used
> to free the initial reference counter of iscsi_cls_conn.
> For non-qla4xxx cases, the ->destroy_conn() callback (e.g.,
> iscsi_conn_teardown) will call iscsi_remove_conn() and iscsi_put_conn() to
> remove the connection from the children list of session and free the
> connection at last.
> However for qla4xxx, it is not the case. The ->destroy_conn() callback
> of qla4xxx will keep the connection in the session conn_list and doesn't
> use iscsi_put_conn() to free the initial reference counter. Therefore,
> it seems necessary to keep the iscsi_put_conn() in the
> iscsi_iter_destroy_conn_fn(), otherwise, there will be memory leak
> problem.
>
I must have thought we did a unregister instead of remove for
some reason. Thanks for catching this.
Reviewed-by: Mike Christie <michael.christie@oracle.com>
next prev parent reply other threads:[~2025-07-17 20:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-15 7:39 [PATCH] Revert "scsi: iscsi: Fix HW conn removal use after free" Li Lingfeng
2025-07-17 20:01 ` Mike Christie [this message]
2025-07-18 1:07 ` Li Lingfeng
2025-07-25 1:21 ` Martin K. Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=653eaa6f-4e85-43af-a13b-906e34a2e517@oracle.com \
--to=michael.christie@oracle.com \
--cc=GR-QLogic-Storage-Upstream@marvell.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=chengzhihao1@huawei.com \
--cc=cleech@redhat.com \
--cc=houtao1@huawei.com \
--cc=jejb@linux.ibm.com \
--cc=lduncan@suse.com \
--cc=lilingfeng3@huawei.com \
--cc=lilingfeng@huaweicloud.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=mrangankar@marvell.com \
--cc=njavali@marvell.com \
--cc=open-iscsi@googlegroups.com \
--cc=yangerkun@huawei.com \
--cc=yi.zhang@huawei.com \
--cc=yukuai1@huaweicloud.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox