Revision 492a74f4210e15f4701422e2e1c4cd3c1e45ddae authored by Steven Rostedt on 25 January 2010, 20:17:47 UTC, committed by Steven Rostedt on 26 January 2010, 21:09:30 UTC
Usually reads of the ring buffer is performed by a single task. There are two types of reads from the ring buffer. One is a consuming read which will consume the entry that was read and the next read will be the entry that follows. The other is an iterator that will let the user read the contents of the ring buffer without modifying it. When an iterator is allocated, writes to the ring buffer are disabled to protect the iterator. The problem exists when consuming reads happen while an iterator is allocated. Specifically, the kind of read that swaps out an entire page (used by splice) and replaces it with a new read. If the iterator is on the page that is swapped out, then the next read may read from this swapped out page and return garbage. This patch adds a check when reading the iterator to make sure that the iterator contents are still valid. If a consuming read has taken place, the iterator is reset. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
1 parent 74bf407
File | Mode | Size |
---|---|---|
Kconfig | -rw-r--r-- | 17.3 KB |
Makefile | -rw-r--r-- | 2.0 KB |
blktrace.c | -rw-r--r-- | 40.6 KB |
ftrace.c | -rw-r--r-- | 70.5 KB |
kmemtrace.c | -rw-r--r-- | 12.4 KB |
power-traces.c | -rw-r--r-- | 361 bytes |
ring_buffer.c | -rw-r--r-- | 96.5 KB |
ring_buffer_benchmark.c | -rw-r--r-- | 10.4 KB |
trace.c | -rw-r--r-- | 99.6 KB |
trace.h | -rw-r--r-- | 22.6 KB |
trace_boot.c | -rw-r--r-- | 4.2 KB |
trace_branch.c | -rw-r--r-- | 8.6 KB |
trace_clock.c | -rw-r--r-- | 2.7 KB |
trace_entries.h | -rw-r--r-- | 9.1 KB |
trace_event_profile.c | -rw-r--r-- | 2.4 KB |
trace_events.c | -rw-r--r-- | 32.1 KB |
trace_events_filter.c | -rw-r--r-- | 29.2 KB |
trace_export.c | -rw-r--r-- | 6.1 KB |
trace_functions.c | -rw-r--r-- | 8.2 KB |
trace_functions_graph.c | -rw-r--r-- | 27.8 KB |
trace_hw_branches.c | -rw-r--r-- | 7.2 KB |
trace_irqsoff.c | -rw-r--r-- | 10.4 KB |
trace_kprobe.c | -rw-r--r-- | 36.7 KB |
trace_ksym.c | -rw-r--r-- | 12.2 KB |
trace_mmiotrace.c | -rw-r--r-- | 9.0 KB |
trace_nop.c | -rw-r--r-- | 2.2 KB |
trace_output.c | -rw-r--r-- | 26.6 KB |
trace_output.h | -rw-r--r-- | 1.6 KB |
trace_printk.c | -rw-r--r-- | 4.9 KB |
trace_sched_switch.c | -rw-r--r-- | 6.8 KB |
trace_sched_wakeup.c | -rw-r--r-- | 9.0 KB |
trace_selftest.c | -rw-r--r-- | 18.3 KB |
trace_selftest_dynamic.c | -rw-r--r-- | 93 bytes |
trace_stack.c | -rw-r--r-- | 7.3 KB |
trace_stat.c | -rw-r--r-- | 8.2 KB |
trace_stat.h | -rw-r--r-- | 973 bytes |
trace_syscalls.c | -rw-r--r-- | 14.9 KB |
trace_sysprof.c | -rw-r--r-- | 6.5 KB |
trace_workqueue.c | -rw-r--r-- | 7.2 KB |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...