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

Roman Zippel (zippel@linux-m68k.org)
Tue, 10 Jun 2003 00:59:21 +0200 (CEST)


Hi,

On Sun, 8 Jun 2003, David S. Miller wrote:

> The transition is half complete. Eventually even that
> "wait for refcount to hit zero" part will go away, and
> also we will add the logic to mark the device at "dead"
> and then teach all the sysfs/procfs routines to error out
> if they see the device they are examining is in this state.

This would be basically the same as moving the try_module_get/module_put
calls from the open/close to the read/write functions.
You still need to synchronize with already running functions and if your
that far it's probably easier to simply replace the ops pointer to get rid
of the dead test.
This still leaves you with a very limited control of the module unloading
process...

bye, Roman

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/