This already happens. This is why all accesses to the module are
protected by try_module_get().
I've analyzed dozens of "here's my implementation idea" mails over the
last two years. Here's the executive summary:
1) It's simply not a good idea to force 1600 modules to change, no
matter what timescale. And changing it in a way that is *more*,
not *less* complex is even worse.
2) It's bad enough to force the interfaces to change: at least the
primitive they are to use is one many of them are already using,
and is very simple to understand.
Rusty.
PS. The *implementation* flaw in your scheme: someone starts using a
module as you try to deregister it. Either you re-register the
module (ie. you can never unload security modules), or you leave
it half unloaded (even worse).
-- Anyone who quotes me in their sig is an idiot. -- Rusty Russell. - 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/