Re: Synchronizing scsi_remove_host and the error handler

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

 



On Mon, 8 Aug 2005, James Bottomley wrote:

> Yes, I was considering something similar, since all the last put of a
> driver does is send the completion that driver_unregister() should be
> waiting for

That's exactly how I came to think of it.

> 
> > +	struct device_driver	*parent_driver;
> 
> I don't think we need this.  The underlying device has to be the parent
> of shost_gendev, so you can get the parent driver as
> 
> shost_gendev.parent->driver

The driver may have completely unbound from the parent device by the time
shost_gendev is released, so .parent->driver may already be NULL.

> > +	if (shost->parent_driver)
> > +		put_driver(shost->parent_driver);
> 
> And just before this would be the place to do the final release of all
> the resources the HBA is holding.

Right.

Alan Stern

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