netdev
[Top] [All Lists]

Re: modular net drivers

To: Keith Owens <kaos@xxxxxxxxxx>
Subject: Re: modular net drivers
From: Andi Kleen <ak@xxxxxx>
Date: Tue, 20 Jun 2000 12:41:46 +0200
Cc: Donald Becker <becker@xxxxxxxxx>, Andrew Morton <andrewm@xxxxxxxxxx>, "netdev@xxxxxxxxxxx" <netdev@xxxxxxxxxxx>
In-reply-to: <3292.961460999@kao2.melbourne.sgi.com>; from Keith Owens on Tue, Jun 20, 2000 at 02:33:47AM +0200
References: <Pine.LNX.4.10.10006192011230.26261-100000@vaio.greennet> <3292.961460999@kao2.melbourne.sgi.com>
Sender: owner-netdev@xxxxxxxxxxx
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.

<Prev in Thread] Current Thread [Next in Thread>