Re: timing of module MODULE_STATE_COMING notifier

From: Rusty Russell
Date: Sun Aug 30 2015 - 21:37:10 EST

"Frank Ch. Eigler" <fche@xxxxxxxxxx> writes:
> Hi, Rusty -
> We just [1] came across your patch [2] from last year (merged into
> 3.17), wherein the RO/NX mapping settings for module sections were
> moved to an earlier point in the module-loading sequence.
> That patch also moved the MODULE_STATE_COMING notifier call to
> complete_formation(), which is relatively early to its former
> do_init_module() call site. It now precedes the parse_args(),
> mod_sysfs_setup(), and trace_module_load() steps.

Yes, parse_args() can enter the module, so you really want it before

> Was the latter part of the change intended & necessary? It is
> negatively impacting systemtap, which was relying on
> MODULE_STATE_COMING being called from a fairly complete module state -
> just before the actual initializer function call.

Notifiers suck for stuff like this :(

Module state has many steps, so my preference has been to open-code
explicit hooks. This would seem to reinforce that preference...

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at