Re: Host drivers and conversion of SCSI to the driver model

Alan Stern
2003-07-03T15:01:06Z

On Fri, 27 Jun 2003, Christoph Hellwig wrote:

> Right, And this issue has been discussed on netdev for a long time.
> The solution that they came up with and I plan to implement in scsi
> aswell as soon as their code actually shows up is to have a mark this
> device gone function that makes the struct device never call back
> into driver code.
>
> If you think a bit about this this is what's really needed - even with
> your notification you'd still have module unload races. With the above
> fix you can just free your private data in your ->remove method
> (or wherever you want) after you marked the struct device / class_device
> gone and be sure it'll never be used again.

How will this interact with the module reference-counting just added to
sysfs by Greg K-H? Maybe with that new feature, none of this will be
needed.

Alan Stern