summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>2014-06-10 09:46:00 -0400
committerSteven Rostedt <rostedt@goodmis.org>2014-06-10 09:46:00 -0400
commit8b8b36834d0fff67fc8668093f4312dd04dcf21d (patch)
tree7568cd26fbcc3f64168a73a1929088df42c57701 /block
parenta9fcaaac37b3baba1343f906f52aeb65c4d4e356 (diff)
downloadop-kernel-dev-8b8b36834d0fff67fc8668093f4312dd04dcf21d.zip
op-kernel-dev-8b8b36834d0fff67fc8668093f4312dd04dcf21d.tar.gz
ring-buffer: Check if buffer exists before polling
The per_cpu buffers are created one per possible CPU. But these do not mean that those CPUs are online, nor do they even exist. With the addition of the ring buffer polling, it assumes that the caller polls on an existing buffer. But this is not the case if the user reads trace_pipe from a CPU that does not exist, and this causes the kernel to crash. Simple fix is to check the cpu against buffer bitmask against to see if the buffer was allocated or not and return -ENODEV if it is not. More updates were done to pass the -ENODEV back up to userspace. Link: http://lkml.kernel.org/r/5393DB61.6060707@oracle.com Reported-by: Sasha Levin <sasha.levin@oracle.com> Cc: stable@vger.kernel.org # 3.10+ Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'block')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud