public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 6/7] module: Add MODULE_STATE_LIVE notify
@ 2008-11-11 20:58 Masami Hiramatsu
  2008-11-11 21:11 ` Steven Rostedt
  0 siblings, 1 reply; 2+ messages in thread
From: Masami Hiramatsu @ 2008-11-11 20:58 UTC (permalink / raw)
  To: Andrew Morton, Rusty Russell
  Cc: Ananth N Mavinakayanahalli, Jim Keniston, David Miller, LKML,
	systemtap-ml, Steven Rostedt

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.

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 6/7] module: Add MODULE_STATE_LIVE notify
  2008-11-11 20:58 [PATCH 6/7] module: Add MODULE_STATE_LIVE notify Masami Hiramatsu
@ 2008-11-11 21:11 ` Steven Rostedt
  0 siblings, 0 replies; 2+ messages in thread
From: Steven Rostedt @ 2008-11-11 21:11 UTC (permalink / raw)
  To: Masami Hiramatsu
  Cc: Andrew Morton, Rusty Russell, Ananth N Mavinakayanahalli,
	Jim Keniston, David Miller, LKML, systemtap-ml


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
> 
> 
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-11-11 21:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-11 20:58 [PATCH 6/7] module: Add MODULE_STATE_LIVE notify Masami Hiramatsu
2008-11-11 21:11 ` Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).