linux/kernel/trace
Steven Rostedt e9dbfae53e tracing: Fix bug when reading system filters on module removal
The event system is freed when its nr_events is set to zero. This happens
when a module created an event system and then later the module is
removed. Modules may share systems, so the system is allocated when
it is created and freed when the modules are unloaded and all the
events under the system are removed (nr_events set to zero).

The problem arises when a task opened the "filter" file for the
system. If the module is unloaded and it removed the last event for
that system, the system structure is freed. If the task that opened
the filter file accesses the "filter" file after the system has
been freed, the system will access an invalid pointer.

By adding a ref_count, and using it to keep track of what
is using the event system, we can free it after all users
are finished with the event system.

Cc: <stable@kernel.org>
Reported-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2011-07-07 11:19:18 -04:00
..
Kconfig ftrace: Build without frame pointers on Microblaze 2011-04-21 09:06:24 -04:00
Makefile
blktrace.c block: make unplug timer trace event correspond to the schedule() unplug 2011-04-16 13:51:05 +02:00
ftrace.c ftrace: Revert 8ab2b7efd ftrace: Remove unnecessary disabling of irqs 2011-06-07 14:49:19 -04:00
power-traces.c
ring_buffer.c ftrace: Add internal recursive checks 2011-05-25 22:13:49 -04:00
ring_buffer_benchmark.c
trace.c Merge commit 'v2.6.39-rc7' into perf/core 2011-05-10 17:05:45 +02:00
trace.h tracing: Fix bug when reading system filters on module removal 2011-07-07 11:19:18 -04:00
trace_branch.c
trace_clock.c Fix common misspellings 2011-03-31 11:26:23 -03:00
trace_entries.h Fix common misspellings 2011-03-31 11:26:23 -03:00
trace_event_perf.c
trace_events.c tracing: Fix bug when reading system filters on module removal 2011-07-07 11:19:18 -04:00
trace_events_filter.c tracing: Fix bug when reading system filters on module removal 2011-07-07 11:19:18 -04:00
trace_export.c
trace_functions.c ftrace: Implement separate user function filtering 2011-05-18 15:29:50 -04:00
trace_functions_graph.c Fix common misspellings 2011-03-31 11:26:23 -03:00
trace_irqsoff.c ftrace: Implement separate user function filtering 2011-05-18 15:29:50 -04:00
trace_kdb.c
trace_kprobe.c kprobes/trace: Fix kprobe selftest for gcc 4.6 2011-06-07 14:47:36 -04:00
trace_mmiotrace.c
trace_nop.c
trace_output.c tracing: Add __print_symbolic_u64 to avoid warnings on 32bit machine 2011-05-25 22:13:44 -04:00
trace_output.h
trace_printk.c tracing: Fix regression in printk_formats file 2011-06-09 08:42:15 -04:00
trace_sched_switch.c tracing: Remove obsolete sched_switch tracer 2011-02-08 17:14:56 -05:00
trace_sched_wakeup.c ftrace: Implement separate user function filtering 2011-05-18 15:29:50 -04:00
trace_selftest.c ftrace: Add self-tests for multiple function trace users 2011-05-18 19:24:51 -04:00
trace_selftest_dynamic.c ftrace: Add self-tests for multiple function trace users 2011-05-18 19:24:51 -04:00
trace_stack.c ftrace: Implement separate user function filtering 2011-05-18 15:29:50 -04:00
trace_stat.c
trace_stat.h
trace_syscalls.c tracing/syscalls: Early terminate search for sys_ni_syscall 2011-02-07 21:30:14 -05:00
trace_workqueue.c