[3.19.y-ckt stable] Patch "module: Call module notifier on failure after complete_formation()" has been added to staging queue
Kamal Mostafa
kamal at canonical.com
Tue Jul 7 00:10:33 UTC 2015
This is a note to let you know that I have just added a patch titled
module: Call module notifier on failure after complete_formation()
to the linux-3.19.y-queue branch of the 3.19.y-ckt extended stable tree
which can be found at:
http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-3.19.y-queue
This patch is scheduled to be released in version 3.19.8-ckt3.
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 3.19.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Kamal
------
>From 3cedf5eb9a17d88069d027cc4dd62aaa5d24d165 Mon Sep 17 00:00:00 2001
From: Steven Rostedt <rostedt at goodmis.org>
Date: Sat, 9 May 2015 03:06:23 +0930
Subject: module: Call module notifier on failure after complete_formation()
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.
Link: http://lkml.kernel.org/r/554C52B9.9060700@gmail.com
Reported-by: Pontus Fuchs <pontus.fuchs at gmail.com>
Fixes: 4982223e51e8 "module: set nx before marking module MODULE_STATE_COMING"
Signed-off-by: Steven Rostedt <rostedt at goodmis.org>
Signed-off-by: Rusty Russell <rusty at rustcorp.com.au>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
kernel/module.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/kernel/module.c b/kernel/module.c
index d856e96..bc8d162 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -3356,6 +3356,9 @@ static int load_module(struct load_info *info, const char __user *uargs,
module_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);
--
1.9.1
More information about the kernel-team
mailing list