[Open-FCoE] [PATCH v2] libfc: rport retry on LS_RJT fromcertain ELS

Abhijeet Joglekar ajoglekar at nuovasystems.com
Wed Jan 21 22:25:04 UTC 2009

> -----Original Message-----
> From: Robert Love [mailto:robert.w.love at linux.intel.com]
> Sent: Wednesday, January 21, 2009 10:14 AM
> To: Abhijeet Joglekar
> Cc: devel at open-fcoe.org
> Subject: Re: [Open-FCoE] [PATCH v2] libfc: rport retry on LS_RJT
> fromcertain ELS
> On Tue, 2009-01-20 at 18:33 -0800, Abhijeet Joglekar wrote:
> > Chris,
> >
> > I am getting exchange leak, and hence a crash while unloading libfc
> > module after applying this patch. Are you seeing this in your tests?
> >
> I've created a fcoe-fixes.git tree that I'm going to use to send
> up to linux-scsi. It's based on Linus' tree and I rebased yesterday
> (maybe the day before) to 2.6.29-rc2  and applied all of our (FCoE
> list) outstanding patches. There might be a leak since my test scripts
> don't test for it, but my test scrips have done a lot of loading and
> unloading of the modules and I don't see a crash.
> How are you noticing the leak?

fc_destroy_exch_mgr() is complaining during module unload that all
exchanges in "libfc_em" are not free. 

I am not hitting the WARN_ON in fc_exch_mgr_free() where it checks for
the total_exches to be zero. So the exch ptr is getting removed from the
manager exchs array and list, but probably has a non-zero reference
count and so does not get released. Maybe we need to put a WARN_ON()
when an ep is removed from the mp list, but its reference count is
non-zero and thus cannot be freed.

I am not current though on the libFC patches that have gone in after the
1st week of December, so might be missing some patch (bug fix) that
maybe got exposed after applying only the rport retry on LS_RJT patch. 

-- abhijeet

More information about the devel mailing list