]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: iscsi: Exclude zero from the endpoint ID range
authorSergey Gorenko <sergeygo@nvidia.com>
Mon, 13 Jun 2022 12:38:54 +0000 (15:38 +0300)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 14 Jun 2022 02:11:36 +0000 (22:11 -0400)
commita15bc7aa7601c7e6818b3b81607be0010dfbd193
treedc729d2ffaf87139a7aa9f79c5b324442f61f1ef
parente28bcc0b45caf83ca9f009ad1b50c363deae59e3
scsi: iscsi: Exclude zero from the endpoint ID range

The kernel returns an endpoint ID as r.ep_connect_ret.handle in the
iscsi_uevent. The iscsid validates a received endpoint ID and treats zero
as an error. The commit referenced in the fixes line changed the endpoint
ID range, and zero is always assigned to the first endpoint ID.  So, the
first attempt to create a new iSER connection always fails.

Link: https://lore.kernel.org/r/20220613123854.55073-1-sergeygo@nvidia.com
Fixes: 109831bd0572 ("scsi: iscsi: Release endpoint ID when its freed")
Reviewed-by: Max Gurtovoy <mgurtovoy@nvidia.com>
Reviewed-by: Mike Christie <michael.christie@oracle.com>
Reviewed-by: Lee Duncan <lduncan@suse.com>
Signed-off-by: Sergey Gorenko <sergeygo@nvidia.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/scsi_transport_iscsi.c