[Top] [All Lists]

Re: modular net drivers

To: Rusty Russell <rusty@xxxxxxxxxxxxxxxx>
Subject: Re: modular net drivers
From: Andrew Morton <andrewm@xxxxxxxxxx>
Date: Thu, 22 Jun 2000 03:31:39 +0000
Cc: Keith Owens <kaos@xxxxxxxxxx>, "netdev@xxxxxxxxxxx" <netdev@xxxxxxxxxxx>
References: Your message of "Wed, 21 Jun 2000 07:49:40 +1000." <4450.961537780@xxxxxxxxxxxx> <20000621065644.4B30A8154@halfway>
Sender: owner-netdev@xxxxxxxxxxx
Rusty Russell wrote:
> module_cleanup should unregister everything first, before doing other
> cleaning up (which might sleep).

Yup.  module_cleanup() calls unregister_netdev().

It would be better to do the unregister_netdev(), then to wait for everyone to 
stop using the device (but how?) and to then reap the module.

> ...
> I can provide code if this is still not clear how this keeps the
> penalty for being a module in the module, and does not pollute the
> rest of the kernel.


pseudo-code would suffice for me.

Guys, I don't think we're going to solve this one any time soon.

Unless Rusty has a trick up the sleeve I'll put together the patch which hoists 
the INC/DEC up into dev.c.  At least that fixes some open/close races.  Plus 
(here he goes
again) timer deletion races are much more important...

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