aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/rtmutex_common.h
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2010-01-25 15:17:47 -0500
committerSteven Rostedt <rostedt@goodmis.org>2010-01-26 16:09:30 -0500
commit492a74f4210e15f4701422e2e1c4cd3c1e45ddae (patch)
treea45808e0aa8e5f50ca934a571660f24d6b2d8e1d /kernel/rtmutex_common.h
parenttracing: Prevent kernel oops with corrupted buffer (diff)
downloadlinux-dev-492a74f4210e15f4701422e2e1c4cd3c1e45ddae.tar.xz
linux-dev-492a74f4210e15f4701422e2e1c4cd3c1e45ddae.zip
ring-buffer: Check if ring buffer iterator has stale data
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>
Diffstat (limited to 'kernel/rtmutex_common.h')
0 files changed, 0 insertions, 0 deletions