linux-brain/drivers/scsi/cxgbi
Mike Christie a686ea60c1 scsi: iscsi: Fix shost->max_id use
[ Upstream commit bdd4aad7ff92ae39c2e93c415bb6761cb8b584da ]

The iscsi offload drivers are setting the shost->max_id to the max number
of sessions they support. The problem is that max_id is not the max number
of targets but the highest identifier the targets can have. To use it to
limit the number of targets we need to set it to max sessions - 1, or we
can end up with a session we might not have preallocated resources for.

Link: https://lore.kernel.org/r/20210525181821.7617-15-michael.christie@oracle.com
Reviewed-by: Lee Duncan <lduncan@suse.com>
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-07-20 16:10:43 +02:00
..
cxgb3i scsi: cxgb3i: Fix some leaks in init_act_open() 2020-06-24 17:50:16 +02:00
cxgb4i scsi: cxgb4i: Fix TLS dependency 2021-01-06 14:48:38 +01:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
libcxgbi.c scsi: iscsi: Fix shost->max_id use 2021-07-20 16:10:43 +02:00
libcxgbi.h cxgb4/libcxgb/cxgb4i/cxgbit: enable eDRAM page pods for iSCSI 2019-06-10 09:20:23 -07:00