Re: [PATCH] scsi: iscsi: fix incorrect error path labels for flashnode operations

11 views
Skip to first unread message

Mike Christie

unread,
Jun 2, 2025, 12:19:27 PMJun 2
to Alok Tiwari, ldu...@suse.com, cle...@redhat.com, James.B...@hansenpartnership.com, martin....@oracle.com, open-...@googlegroups.com, linux...@vger.kernel.org, linux-...@vger.kernel.org, darren...@oracle.com
On 5/30/25 2:29 PM, Alok Tiwari wrote:
> Correct the error handling goto labels used when host lookup fails in
> various flashnode-related event handlers:
> - iscsi_new_flashnode()
> - iscsi_del_flashnode()
> - iscsi_login_flashnode()
> - iscsi_logout_flashnode()
> - iscsi_logout_flashnode_sid()
>
> scsi_host_put() is not required when shost is NULL, so jumping to the
> correct label avoids unnecessary operations. These functions previously
> jumped to the wrong goto label (put_host), which did not match the
> intended cleanup logic.
> Updated to use the correct exit labels (exit_new_fnode, exit_del_fnode,
> etc.) to ensure proper error handling.
> Also removed the unused put_host label under iscsi_new_flashnode()
> as it is no longer needed.
>
> No functional changes beyond accurate error path correction.
>
> Fixes: c6a4bb2ef596 ("[SCSI] scsi_transport_iscsi: Add flash node mgmt support")
> Signed-off-by: Alok Tiwari <alok.a...@oracle.com>


Thanks.

Reviewed-by: Mike Christie <michael....@oracle.com>

Martin K. Petersen

unread,
Jun 3, 2025, 10:16:23 PMJun 3
to Alok Tiwari, ldu...@suse.com, cle...@redhat.com, michael....@oracle.com, James.B...@hansenpartnership.com, martin....@oracle.com, open-...@googlegroups.com, linux...@vger.kernel.org, linux-...@vger.kernel.org, darren...@oracle.com

Alok,

> Correct the error handling goto labels used when host lookup fails in
> various flashnode-related event handlers:
> - iscsi_new_flashnode()
> - iscsi_del_flashnode()
> - iscsi_login_flashnode()
> - iscsi_logout_flashnode()
> - iscsi_logout_flashnode_sid()

Applied to 6.16/scsi-staging, thanks!

--
Martin K. Petersen

Martin K. Petersen

unread,
Jun 9, 2025, 10:07:26 PMJun 9
to ldu...@suse.com, cle...@redhat.com, michael....@oracle.com, James.B...@hansenpartnership.com, open-...@googlegroups.com, linux...@vger.kernel.org, Alok Tiwari, Martin K . Petersen, linux-...@vger.kernel.org, darren...@oracle.com
On Fri, 30 May 2025 12:29:35 -0700, Alok Tiwari wrote:

> Correct the error handling goto labels used when host lookup fails in
> various flashnode-related event handlers:
> - iscsi_new_flashnode()
> - iscsi_del_flashnode()
> - iscsi_login_flashnode()
> - iscsi_logout_flashnode()
> - iscsi_logout_flashnode_sid()
>
> [...]

Applied to 6.16/scsi-fixes, thanks!

[1/1] scsi: iscsi: fix incorrect error path labels for flashnode operations
https://git.kernel.org/mkp/scsi/c/9b17621366d2

--
Martin K. Petersen Oracle Linux Engineering
Reply all
Reply to author
Forward
0 new messages