Skip to content
  • Lai Jiangshan's avatar
    tracing: disable seeking for trace_pipe_raw · d1e7e02f
    Lai Jiangshan authored
    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):
           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: default avatarLai Jiangshan <>
    Cc: Frederic Weisbecker <>
    Cc: Steven Rostedt <>
    LKML-Reference: <>
    Signed-off-by: default avatarIngo Molnar <>