mirror of
https://github.com/torvalds/linux.git
synced 2026-05-14 17:32:42 +02:00
The "enable" file for the event system can be removed when a module is unloaded and the event system only has events from that module. As the event system nr_events count goes to zero, it may be freed if its ref_count is also set to zero. Like the "filter" file, the "enable" file may be opened by a task and referenced later, after a module has been unloaded and the events for that event system have been removed. Although the "filter" file referenced the event system structure, the "enable" file only references a pointer to the event system name. Since the name is freed when the event system is removed, it is possible that an access to the "enable" file may reference a freed pointer. Update the "enable" file to use the subsystem_open() routine that the "filter" file uses, to keep a reference to the event system structure while the "enable" file is opened. Cc: <stable@kernel.org> Reported-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org> |
||
|---|---|---|
| .. | ||
| blktrace.c | ||
| ftrace.c | ||
| Kconfig | ||
| Makefile | ||
| power-traces.c | ||
| ring_buffer_benchmark.c | ||
| ring_buffer.c | ||
| trace_branch.c | ||
| trace_clock.c | ||
| trace_entries.h | ||
| trace_event_perf.c | ||
| trace_events_filter.c | ||
| trace_events.c | ||
| trace_export.c | ||
| trace_functions_graph.c | ||
| trace_functions.c | ||
| trace_irqsoff.c | ||
| trace_kdb.c | ||
| trace_kprobe.c | ||
| trace_mmiotrace.c | ||
| trace_nop.c | ||
| trace_output.c | ||
| trace_output.h | ||
| trace_printk.c | ||
| trace_sched_switch.c | ||
| trace_sched_wakeup.c | ||
| trace_selftest_dynamic.c | ||
| trace_selftest.c | ||
| trace_stack.c | ||
| trace_stat.c | ||
| trace_stat.h | ||
| trace_syscalls.c | ||
| trace_workqueue.c | ||
| trace.c | ||
| trace.h | ||