scsi: be2iscsi: Add checks to validate CID alloc/free
Set CID slot to 0xffff to indicate empty. Check if connection already exists in conn_table before binding. Check if endpoint already NULL before putting back CID. Break ep->conn link in free_ep to ignore completions after freeing. Signed-off-by: Jitendra Bhivare <jitendra.bhivare@broadcom.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:

gecommit door
Martin K. Petersen

bovenliggende
29e80b7ce3
commit
413f365657
@@ -343,6 +343,7 @@ struct beiscsi_hba {
|
||||
spinlock_t async_pdu_lock;
|
||||
struct list_head hba_queue;
|
||||
#define BE_MAX_SESSION 2048
|
||||
#define BE_INVALID_CID 0xffff
|
||||
#define BE_SET_CID_TO_CRI(cri_index, cid) \
|
||||
(phba->cid_to_cri_map[cid] = cri_index)
|
||||
#define BE_GET_CRI_FROM_CID(cid) (phba->cid_to_cri_map[cid])
|
||||
|
Verwijs in nieuw issue
Block a user