Patch "module: Call module notifier on failure after complete_formation()" has been added to the 4.0-stable tree
This is a note to let you know that I've just added the patch titled
module: Call module notifier on failure after complete_formation()
to the 4.0-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
module-call-module-notifier-on-failure-after-complete_formation.patch
and it can be found in the queue-4.0 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
37815bf866ab6722a47550f8d25ad3f1a16a680cMon Sep 17 00:00:00 2001
From: Steven Rostedt <[email protected]>
Date: Sat, 9 May 2015 03:06:23 +0930
Subject: module: Call module notifier on failure after complete_formation()
From: Steven Rostedt <[email protected]>
commit 37815bf866ab6722a47550f8d25ad3f1a16a680c upstream.
The module notifier call chain for MODULE_STATE_COMING was moved up before the parsing of args, into the complete_formation() call. But if the module failed to load after that, the notifier call chain for MODULE_STATE_GOING was never called and that prevented the users of those call chains from cleaning up anything that was allocated.
--- kernel/module.c | 3 +++ 1 file changed, 3 insertions(+)
kernel/module.c +3 -0
@@ -3366,6 +3366,9 @@ static int load_module(struct load_infomodule_bug_cleanup (mod);mutex_unlock (&module_mutex); +blocking_notifier_call_chain (&module_notify_list, +MODULE_STATE_GOING , mod); +/* we can't deallocate the module until we clear memory protection */ unset_module_init_ro_nx (mod);unset_module_core_ro_nx (mod);
Patches currently in stable-queue which might be from [email protected] are
queue-4.0/module-call-module-notifier-on-failure-after-complete_formation.patch