Re: [PATCH][ATM] use rtnl_{lock,unlock} during device operations (take 2)

From: David S. Miller (
Date: Sun Jun 08 2003 - 01:43:22 EST

On Sat, 2003-06-07 at 20:45, Werner Almesberger wrote:
> Well, that's just the good old broken module API problem again.
> Under the premise that modules can't be fixed, but the world
> around them can, try_module_get is an adequate band-aid for
> this API bug, but I wouldn't apply Kant's formula of universal
> law quite so literally here :-)

Netdevices NO LONGER use module refcounts in any way shape or form. They
are not needed to fix problems of this nature.

They way to fix it is to always dynamically allocate your netdevice
objects, and mark them dead. The final kfree() of the object can be
deferred until the final reference goes away, and that could be 10 years
from now, it doesn't matter and the module can be unloaded NOW and
without any delay.

David S. Miller <>
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Sun Jun 15 2003 - 22:00:18 EST