1. 09 May, 2013 2 commits
    • Steven Rostedt (Red Hat)'s avatar
      tracing: Return error if register_ftrace_function_probe() fails for event_enable_func() · ff305ded
      Steven Rostedt (Red Hat) authored
      register_ftrace_function_probe() returns the number of functions
      it registered, which can be zero, it can also return a negative number
      if something went wrong. But event_enable_func() only checks for
      the case that it didn't register anything, it needs to also check
      for the case that something went wrong and return that error code
      as well.
      
      Added some comments about the code as well, to make it more
      understandable.
      
      Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      ff305ded
    • Masami Hiramatsu's avatar
      tracing: Don't succeed if event_enable_func did not register anything · a5b85bd1
      Masami Hiramatsu authored
      Return 0 instead of the number of activated ftrace function probes if
      event_enable_func succeeded and return an error code if it failed or
      did not register any functions. But it currently returns the number
      of registered functions and if it didn't register anything, it returns 0,
      but that is considered success.
      
      This also fixes the return value. As if it succeeds, it returns the
      number of functions that were enabled, which is returned back to
      the user in ftrace_regex_write (the write() return code). If only
      one function is enabled, then the return code of the write is one,
      and this can confuse the user program in thinking it only wrote 1
      byte.
      
      Link: http://lkml.kernel.org/r/20130509054413.30398.55650.stgit@mhiramat-M0-7522
      
      Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Tom Zanussi <tom.zanussi@intel.com>
      Signed-off-by: default avatarMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      [ Rewrote change log to reflect that this fixes two bugs - SR ]
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      a5b85bd1
  2. 03 May, 2013 1 commit
  3. 30 Apr, 2013 37 commits