Re: [PATCH 1/7] BNX2I: Separated the hardware's cleanup procedure from ep_disconnect

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?
> 


--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux