Keith Owens wrote:
> Incrementing the use count at registration time is no good, it stops
> the module being unloaded. Operations are deregistered at rmmod time.
> Setting the use count at registration prevents rmmod from removing the
> module, so you cannot deregister the operations. Catch 22.
But those references go through the module exit function, which
acts like an implicit reference counter. So as long as
- module exit de-registers all of them (if it doesn't, we're
screwed anyhow), and
- the registry itself isn't racy (if it is, this is likely to
surface in other circumstances too, e.g. if a driver destroys
internal state immediately after de-registration)
they should be safe, shouldn't they ?
- Werner
P.S. mail.ocs.com.au thinks I'm a spammer :-(
-- _________________________________________________________________________ / Werner Almesberger, Buenos Aires, Argentina wa@almesberger.net / /_http://icapeople.epfl.ch/almesber/_____________________________________/ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sun Jul 07 2002 - 22:00:08 EST