summaryrefslogtreecommitdiffstats
path: root/kernel/module.c
diff options
context:
space:
mode:
authorMasami Hiramatsu <mhiramat@redhat.com>2009-01-06 14:41:54 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-06 15:59:21 -0800
commit0deddf436a37c18ceb26c6e3b632fb9b5f58a0c1 (patch)
treeff6e3066d76d57b22fd82eed8f8e9d2ce07cf4f0 /kernel/module.c
parent49ad2fd76c97133fb396edc24ded7fe26093a578 (diff)
downloadlinux-0deddf436a37c18ceb26c6e3b632fb9b5f58a0c1.tar.gz
linux-0deddf436a37c18ceb26c6e3b632fb9b5f58a0c1.tar.bz2
linux-0deddf436a37c18ceb26c6e3b632fb9b5f58a0c1.zip
module: add MODULE_STATE_LIVE notify
Add a module notifier call which notifies that the state of a module changes from MODULE_STATE_COMING to MODULE_STATE_LIVE. Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com> Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com> Acked-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/module.c')
-rw-r--r--kernel/module.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/module.c b/kernel/module.c
index cc79c942c572..496dcb57b608 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -2352,6 +2352,8 @@ sys_init_module(void __user *umod,
/* Now it's a first class citizen! Wake up anyone waiting for it. */
mod->state = MODULE_STATE_LIVE;
wake_up(&module_wq);
+ blocking_notifier_call_chain(&module_notify_list,
+ MODULE_STATE_LIVE, mod);
mutex_lock(&module_mutex);
/* Drop initial reference. */