Aaron Tomlin <atomlin@xxxxxxxxxx> writes:
In load_module() in the event of an error, for e.g. unknown module
parameter(s) specified we go to perform some module coming clean up
operations. At this point the module is still in a "formed" state
when it is actually going away.
This patch updates the module's state accordingly to ensure anyone on the
module_notify_list waiting for a module going away notification will be
notified accordingly.
I recall a similar proposal before.
I've audited all the subscribers to check they didn't look at
mod->state; they seem OK.
We actually do this in the init-failed path, so this should be OK.