]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge remote-tracking branch 'metag/for-next'
authorStephen Rothwell <sfr@canb.auug.org.au>
Wed, 10 Feb 2016 23:41:07 +0000 (10:41 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 10 Feb 2016 23:41:07 +0000 (10:41 +1100)
1  2 
arch/metag/kernel/ftrace.c

index ac8c039b0318fe48929bff8f60ec4f9d58740120,4abcae435cac4f88c29e58bb04ce4b30f4e0d650..f7b23d300881b9bf1409c0afd80c4bfd93e27c79
@@@ -54,11 -54,12 +54,11 @@@ static int ftrace_modify_code(unsigned 
        unsigned char replaced[MCOUNT_INSN_SIZE];
  
        /*
 -       * Note: Due to modules and __init, code can
 -       *  disappear and change, we need to protect against faulting
 -       *  as well as code changing.
 -       *
 -       * No real locking needed, this code is run through
 -       * kstop_machine.
 +       * Note:
 +       * We are paranoid about modifying text, as if a bug was to happen, it
 +       * could cause us to read or write to someplace that could cause harm.
 +       * Carefully read and modify the code with probe_kernel_*(), and make
 +       * sure what we read is what we expected it to be before modifying it.
         */
  
        /* read the text we want to modify */
@@@ -115,7 -116,6 +115,6 @@@ int ftrace_make_call(struct dyn_ftrace 
        return ftrace_modify_code(ip, old, new);
  }
  
- /* run from kstop_machine */
  int __init ftrace_dyn_arch_init(void)
  {
        return 0;