Re: [PATCH] Fix reference counting for failed SCSI devices

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

 



On Wed, 2005-05-25 at 14:46 +0200, Hannes Reinecke wrote:
> > so it's contained within the scsi_device.  Freeing the scsi_device frees
> > the classdev (and the gendev).
> > 
> But does not call the ->release function.

Please just read the code like I asked.  If you do, you'll find that the
sdev_classdev release method is NULL until scsi_sysfs_add_sdev()
precisely for the reason that the class references don't matter until
that point.  We're free to kill the whole thing without bothering about
the class devices until scsi_add_lun detects something and calls
scsi_sysfs_add_sdev() to make the whole thing visible.  Then all
classdevs get a ref on the parent gendev which their release method
relinquishes.

> Put it the other way round: does 'rmmod aic7xxx' work for you?
> It certainly did _not_ work for aic79xx, hence the fix.

Well, I know aic7xxx works perfectly on a dual channel card, because I
actually test the failure paths and insmod/rmmod is one of my tests.  I
can't comment on aic79xx because I don't have the hardware.

James


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