Commit 0deddf43 authored by Masami Hiramatsu's avatar Masami Hiramatsu Committed by Linus Torvalds

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: default avatarMasami Hiramatsu <mhiramat@redhat.com>
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
Acked-by: default avatarRusty Russell <rusty@rustcorp.com.au>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 49ad2fd7
...@@ -2352,6 +2352,8 @@ sys_init_module(void __user *umod, ...@@ -2352,6 +2352,8 @@ sys_init_module(void __user *umod,
/* Now it's a first class citizen! Wake up anyone waiting for it. */ /* Now it's a first class citizen! Wake up anyone waiting for it. */
mod->state = MODULE_STATE_LIVE; mod->state = MODULE_STATE_LIVE;
wake_up(&module_wq); wake_up(&module_wq);
blocking_notifier_call_chain(&module_notify_list,
MODULE_STATE_LIVE, mod);
mutex_lock(&module_mutex); mutex_lock(&module_mutex);
/* Drop initial reference. */ /* Drop initial reference. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment