Re: [PATCH] In-kernel module loader 1/7

From: Roman Zippel (
Date: Thu Sep 19 2002 - 08:54:40 EST


On Thu, 19 Sep 2002, Rusty Russell wrote:

> If every single object in the kernel is reference counted, *yes* you
> can do this. But they're not, and they will never be. Changing them
> over to use try_module_get() is feasible, though.

Rusty, slowly I'm pissed. :(
I already said often enough, a module has only to answer the simple
question: Is it safe to unload the module? Reference counts is the
simplest way, but I'm sure even you can come up with other methods.
On the other hand you force on _everyone_ to use try_module_get(), which
are nothing else than reference counts. As I already wrote in my last
This is simple resource management, everyone writing kernel code has to do
this anyway, adding modules to this picture doesn't change it much. As
long as you have control over all your objects, you also know easily
whether it's safe to unload or not, but only the driver knows this, the
module code can only guess or it has to be told explicitely via
In other words: If you get it right with try_module_get(), you will more
easily get it right with reference counts.

bye, Roman

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 : Mon Sep 23 2002 - 22:00:26 EST