From: Masami Hiramatsu Date: Tue, 6 Jan 2009 22:41:54 +0000 (-0800) Subject: module: add MODULE_STATE_LIVE notify X-Git-Tag: v2.6.29-rc1~309 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0deddf436a37c18ceb26c6e3b632fb9b5f58a0c1;p=platform%2Fkernel%2Flinux-3.10.git 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 Cc: Ananth N Mavinakayanahalli Cc: Anil S Keshavamurthy Acked-by: Rusty Russell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/module.c b/kernel/module.c index cc79c94..496dcb5 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. */