Skip to content
Commit c19dcd01 authored by Anil Veerabhadrappa's avatar Anil Veerabhadrappa Committed by James Bottomley
Browse files

[SCSI] bnx2i : Fix "cid #n not valid" issue



When bnx2i_adapter_ready() fails, connection handle(cid) = 0 is wrongly freed
because 'cid' is not yet allocated for the endpoint.  Fix is to initialize
bnx2i_ep->ep_iscsi_cid to '-1' in bnx2i_alloc_ep() and not in
bnx2i_ep_connect() to avoid releasing invalid 'cid'.  There is already a check
in bnx2i_free_iscsi_cid() not to free invalid iscsi connection handle (-1)

Signed-off-by: default avatarAnil Veerabhadrappa <anilgv@broadcom.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent 534cc9c1
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment