Re: question about sas_phy_alloc

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

 



On Tue, 9 Aug 2011, Darrick J. Wong wrote:

> On Mon, Aug 08, 2011 at 03:03:06PM +0200, Julia Lawall wrote:
> > The definition of sas_phy_free has the comment:
> > 
> >  * Note:
> >  *   This function must only be called on a PHY that has not
> >  *   successfully been added using sas_phy_add().
> > 
> > Does this mean that the function should only be used when a call to 
> > sas_phy_add has taken place and that call has failed?  Or should it also 
> > be used when sas_phy_add has not yet been called and an error occurs?
> > 
> > Concretely, I am wondering about the functions 
> > mpt2sas_transport_add_host_phy and mpt2sas_transport_add_expander_phy in 
> > the file drivers/scsi/mpt2sas/mpt2sas_transport.c.  Each function has a 
> > potential failure on _transport_set_identify before sas_phy_add is called, 
> > and I wonder if sas_phy_free should be called in these cases.
> 
> Based on my reading of all that code and my hazy memories of working on libsas,
> to tear down a sas_phy that has not been sas_phy_add'd, one uses sas_phy_free.
> To tear down a sas_phy that has been sas_phy_add'd, use sas_phy_delete.  More
> concretely, I agree with you that mpt2sas needs a few more sas_phy_free's.
> 
> Shorter answer: {yes, yes, yes}. :)

OK, thanks.  I will submit a patch.

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