Messages in this thread |  | | Date | Thu, 23 Jan 1997 12:58:54 +0300 (IST) | From | Gadi Oxman <> | Subject | Re: Module unloading (was modutils-970118 problem) |
| |
Hi,
> Ok, it seems there are irritating side effects of the MOD_USED_ONCE > bits in the recent modules code. > > What I want most of all is for things not to fail mysteriously for > L. User -- which is why I think that the used once hack is still a > good one. But what about everyone else that just gets irritated?
One side effect of MOD_USED_ONCE might be that we will be hiding races by making them very rare, but not eliminate them completely.
For example:
1. Some code uses the module without MOD_INC_USE_COUNT and goes to sleep.
2. kerneld wants to unload the module, but MOD_USED_ONCE entered the picture and eliminated the race.
3. We register the module usage and use the module for a while. At some point, we stop using the module and from now on, kerneld is free to unload it.
4. Before kerneld managed to unload the module, we want to use it again. We therefore repeat the cycle starting from step 1, only this time with MOD_USED_ONCE set, and the original race can now affect us.
Gadi
|  |