Messages in this thread | | | Date | Fri, 20 Feb 2009 18:34:54 +0100 | From | Ingo Molnar <> | Subject | Re: [PATCH 5/5] ftrace, x86: do not depend on system state for kernel text info |
| |
* Steven Rostedt <rostedt@goodmis.org> wrote:
> From: Steven Rostedt <srostedt@redhat.com> > > Andrew Morton pointed out that using SYSTEM_STATE is a bad idea > since there is no guarantee to what its state will actually be. > > Instead, I moved the check into the set_kernel_text_* functions > themselves, and use a local variable to determine when it is > OK to change the kernel text RW permissions. > > Reported-by: Andrew Morton <akpm@linux-foundation.org> > Signed-off-by: Steven Rostedt <srostedt@redhat.com> > --- > arch/x86/kernel/ftrace.c | 8 -------- > arch/x86/mm/init_32.c | 10 ++++++++++ > arch/x86/mm/init_64.c | 10 ++++++++++ > 3 files changed, 20 insertions(+), 8 deletions(-) > > diff --git a/arch/x86/kernel/ftrace.c b/arch/x86/kernel/ftrace.c > index c9ba2f9..025d783 100644 > --- a/arch/x86/kernel/ftrace.c > +++ b/arch/x86/kernel/ftrace.c > @@ -28,20 +28,12 @@ > > int ftrace_arch_modify_prepare(void) > { > - /* at boot up, we are still writable */ > - if (system_state != SYSTEM_RUNNING) > - return 0; > -
Since i suspect you'll rebase anyway, i'd suggest to squash this patch into patch #2, with credit to Andrew added.
Ingo
| |