aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorLai Jiangshan <laijs@cn.fujitsu.com>2009-04-02 03:16:56 -0400
committerIngo Molnar <mingo@elte.hu>2009-04-10 06:44:42 -0400
commitd1e7e02f30be672c6f6ee40908be83877a0d49d1 (patch)
tree24f958961d8de3ef0c1d16a407041d096fc1f098 /kernel
parent62b8e680e61d3f48f2a12ee248ca03ea8f376926 (diff)
tracing: disable seeking for trace_pipe_raw
Impact: disable pread() We set tracing_buffers_fops.llseek to no_llseek, but we can still perform pread() to read this file. That is not expected. This fix uses nonseekable_open() to disable it. tracing_buffers_fops.llseek is still set to no_llseek, it mark this file is a "non-seekable device" and is used by sys_splice(). See also do_splice() or manual of splice(2): ERRORS EINVAL Target file system doesn't support splicing; neither of the descriptors refers to a pipe; or offset given for non-seekable device. Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Steven Rostedt <srostedt@redhat.com> LKML-Reference: <49D46668.8030806@cn.fujitsu.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/trace/trace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 9d28476a9851..24b0168f1a29 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -3285,7 +3285,7 @@ static int tracing_buffers_open(struct inode *inode, struct file *filp)
3285 3285
3286 filp->private_data = info; 3286 filp->private_data = info;
3287 3287
3288 return 0; 3288 return nonseekable_open(inode, filp);
3289 3289
3290 out: 3290 out:
3291 kfree(info); 3291 kfree(info);