Hello Mike,

You're right. That extra checking for !hba was added recently as
defensive programming and it should never hit.  I'll remove it in v2.

Thanks,
Eddie

On Tue, 2010-06-29 at 22:53 -0700, Mike Christie wrote:
> On 06/25/2010 08:39 PM, Eddie Wai wrote:
> > +/**
> > + * bnx2i_ep_disconnect - executes TCP connection teardown process
> > + * @ep:            TCP connection (iscsi endpoint) handle
> > + *
> > + * executes  TCP connection teardown process
> > + */
> > +static void bnx2i_ep_disconnect(struct iscsi_endpoint *ep)
> > +{
> > +   struct bnx2i_endpoint *bnx2i_ep;
> > +   struct bnx2i_conn *bnx2i_conn = NULL;
> > +   struct iscsi_conn *conn = NULL;
> > +   struct bnx2i_hba *hba;
> > +
> > +   bnx2i_ep = ep->dd_data;
> > +
> > +   /* driver should not attempt connection cleanup until TCP_CONNECT
> > +    * completes either successfully or fails. Timeout is 9-secs, so
> > +    * wait for it to complete
> > +    */
> > +   while ((bnx2i_ep->state == EP_STATE_CONNECT_START)&&
> > +           !time_after(jiffies, bnx2i_ep->timestamp + (12 * HZ)))
> > +           msleep(250);
> > +
> > +   if (bnx2i_ep->conn) {
> > +           bnx2i_conn = bnx2i_ep->conn;
> > +           conn = bnx2i_conn->cls_conn->dd_data;
> > +           iscsi_suspend_queue(conn);
> > +   }
> > +   hba = bnx2i_ep->hba;
> > +   if (!hba)
> > +           goto out;
> 
> 
> Here you have a ep, so if you goto out you will not release it. Need to 
> call iscsi_destroy_endpoint at least. Can you hit this "if" even?
> 


-- 
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-is...@googlegroups.com.
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/open-iscsi?hl=en.

Reply via email to