On Tue, Jun 20, 2000 at 02:33:47AM +0200, Keith Owens wrote:
> >> - All 2.4-only netdrivers can have all their MOD_DEC and MOD_INC calls
> >> removed. All that twisty logic to keep track of the counts can be
> >> tossed. A single
> >>
> >> SET_NETDEVICE_OWNER(dev);
> >
> >"Twisty logic"? Most of the drivers have straight-forward use counts.
> >How is this new method any simpler? If anything, it seems to be more
> >complex without any obvious benefit.
>
> There are inherent unload races when code that lives inside a module
> tries to adjust the use count on that module. To the extent that the
> code pages can be deleted underneath the code that is executing!
> Module use counts need to be set before entering the module, not after
> the module code has started executing.
At least for open/close() that is not true -- rtnl_lock() protects against
that. For that there are the same rules as in 2.2 (INC before first sleep,
DEC after last sleep)
-Andi
--
This is like TV. I don't like TV.
|