This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [PATCH 6/7] module: Add MODULE_STATE_LIVE notify
- From: Steven Rostedt <rostedt at goodmis dot org>
- To: Masami Hiramatsu <mhiramat at redhat dot com>
- Cc: Andrew Morton <akpm at linux-foundation dot org>, Rusty Russell <rusty at rustcorp dot com dot au>, Ananth N Mavinakayanahalli <ananth at in dot ibm dot com>, Jim Keniston <jkenisto at us dot ibm dot com>, David Miller <davem at davemloft dot net>, LKML <linux-kernel at vger dot kernel dot org>, systemtap-ml <systemtap at sources dot redhat dot com>
- Date: Tue, 11 Nov 2008 16:10:16 -0500 (EST)
- Subject: Re: [PATCH 6/7] module: Add MODULE_STATE_LIVE notify
- References: <4919F1B9.3060300@redhat.com>
On Tue, 11 Nov 2008, Masami Hiramatsu wrote:
> 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>
> ---
> kernel/module.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> Steven, Ananth told me that this patch might also help to solve
> cmpxchg problem.
I'm assuming you are talking about the infamous e1000e ftrace cmpxchg
corruption bug?
In anycase, ftrace has already solved those issues, and does not use
cmpxchg anymore.
Thanks anyway,
-- Steve
>
> Index: 2.6.28-rc4/kernel/module.c
> ===================================================================
> --- 2.6.28-rc4.orig/kernel/module.c
> +++ 2.6.28-rc4/kernel/module.c
> @@ -2346,6 +2346,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. */
>
> --
> Masami Hiramatsu
>
> Software Engineer
> Hitachi Computer Products (America) Inc.
> Software Solutions Division
>
> e-mail: mhiramat@redhat.com
>
>
>