diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-08-07 16:01:30 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-08-07 16:01:30 -0400 |
| commit | b7bc9e7d808ba55729bd263b0210cda36965be32 (patch) | |
| tree | 3854bc709c38f75fbc4b9e90bdedba5202482dc1 /include/linux | |
| parent | 8ef9c292ac7bf91fc0367746cf5db264adddced9 (diff) | |
| parent | 9457158bbc0ee04ecef76862d73eecd8076e9c7b (diff) | |
Merge tag 'trace-fixes-3.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace
Pull tracing fixes from Steven Rostedt:
"Oleg Nesterov has been working hard in closing all the holes that can
lead to race conditions between deleting an event and accessing an
event debugfs file. This included a fix to the debugfs system (acked
by Greg Kroah-Hartman). We think that all the holes have been patched
and hopefully we don't find more. I haven't marked all of them for
stable because I need to examine them more to figure out how far back
some of the changes need to go.
Along the way, some other fixes have been made. Alexander Z Lam fixed
some logic where the wrong buffer was being modifed.
Andrew Vagin found a possible corruption for machines that actually
allocate cpumask, as a reference to one was being zeroed out by
mistake.
Dhaval Giani found a bad prototype when tracing is not configured.
And I not only had some changes to help Oleg, but also finally fixed a
long standing bug that Dave Jones and others have been hitting, where
a module unload and reload can cause the function tracing accounting
to get screwed up"
* tag 'trace-fixes-3.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
tracing: Fix reset of time stamps during trace_clock changes
tracing: Make TRACE_ITER_STOP_ON_FREE stop the correct buffer
tracing: Fix trace_dump_stack() proto when CONFIG_TRACING is not set
tracing: Fix fields of struct trace_iterator that are zeroed by mistake
tracing/uprobes: Fail to unregister if probe event files are in use
tracing/kprobes: Fail to unregister if probe event files are in use
tracing: Add comment to describe special break case in probe_remove_event_call()
tracing: trace_remove_event_call() should fail if call/file is in use
debugfs: debugfs_remove_recursive() must not rely on list_empty(d_subdirs)
ftrace: Check module functions being traced on reload
ftrace: Consolidate some duplicate code for updating ftrace ops
tracing: Change remove_event_file_dir() to clear "d_subdirs"->i_private
tracing: Introduce remove_event_file_dir()
tracing: Change f_start() to take event_mutex and verify i_private != NULL
tracing: Change event_filter_read/write to verify i_private != NULL
tracing: Change event_enable/disable_read() to verify i_private != NULL
tracing: Turn event/id->i_private into call->event.type
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/ftrace_event.h | 12 | ||||
| -rw-r--r-- | include/linux/kernel.h | 2 |
2 files changed, 8 insertions, 6 deletions
diff --git a/include/linux/ftrace_event.h b/include/linux/ftrace_event.h index 4372658c73ae..120d57a1c3a5 100644 --- a/include/linux/ftrace_event.h +++ b/include/linux/ftrace_event.h | |||
| @@ -78,6 +78,11 @@ struct trace_iterator { | |||
| 78 | /* trace_seq for __print_flags() and __print_symbolic() etc. */ | 78 | /* trace_seq for __print_flags() and __print_symbolic() etc. */ |
| 79 | struct trace_seq tmp_seq; | 79 | struct trace_seq tmp_seq; |
| 80 | 80 | ||
| 81 | cpumask_var_t started; | ||
| 82 | |||
| 83 | /* it's true when current open file is snapshot */ | ||
| 84 | bool snapshot; | ||
| 85 | |||
| 81 | /* The below is zeroed out in pipe_read */ | 86 | /* The below is zeroed out in pipe_read */ |
| 82 | struct trace_seq seq; | 87 | struct trace_seq seq; |
| 83 | struct trace_entry *ent; | 88 | struct trace_entry *ent; |
| @@ -90,10 +95,7 @@ struct trace_iterator { | |||
| 90 | loff_t pos; | 95 | loff_t pos; |
| 91 | long idx; | 96 | long idx; |
| 92 | 97 | ||
| 93 | cpumask_var_t started; | 98 | /* All new field here will be zeroed out in pipe_read */ |
| 94 | |||
| 95 | /* it's true when current open file is snapshot */ | ||
| 96 | bool snapshot; | ||
| 97 | }; | 99 | }; |
| 98 | 100 | ||
| 99 | enum trace_iter_flags { | 101 | enum trace_iter_flags { |
| @@ -332,7 +334,7 @@ extern int trace_define_field(struct ftrace_event_call *call, const char *type, | |||
| 332 | const char *name, int offset, int size, | 334 | const char *name, int offset, int size, |
| 333 | int is_signed, int filter_type); | 335 | int is_signed, int filter_type); |
| 334 | extern int trace_add_event_call(struct ftrace_event_call *call); | 336 | extern int trace_add_event_call(struct ftrace_event_call *call); |
| 335 | extern void trace_remove_event_call(struct ftrace_event_call *call); | 337 | extern int trace_remove_event_call(struct ftrace_event_call *call); |
| 336 | 338 | ||
| 337 | #define is_signed_type(type) (((type)(-1)) < (type)1) | 339 | #define is_signed_type(type) (((type)(-1)) < (type)1) |
| 338 | 340 | ||
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 3bef14c6586b..482ad2d84a32 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
| @@ -629,7 +629,7 @@ extern void ftrace_dump(enum ftrace_dump_mode oops_dump_mode); | |||
| 629 | static inline void tracing_start(void) { } | 629 | static inline void tracing_start(void) { } |
| 630 | static inline void tracing_stop(void) { } | 630 | static inline void tracing_stop(void) { } |
| 631 | static inline void ftrace_off_permanent(void) { } | 631 | static inline void ftrace_off_permanent(void) { } |
| 632 | static inline void trace_dump_stack(void) { } | 632 | static inline void trace_dump_stack(int skip) { } |
| 633 | 633 | ||
| 634 | static inline void tracing_on(void) { } | 634 | static inline void tracing_on(void) { } |
| 635 | static inline void tracing_off(void) { } | 635 | static inline void tracing_off(void) { } |
