Re: [PATCH] trace-cmd: Add check for truncated files

From: Steven Rostedt
Date: Tue Jun 21 2011 - 15:27:08 EST


On Mon, 2011-06-20 at 17:19 -0700, Vaibhav Nagarnaik wrote:
> If the trace data file that is being read is truncated, mmap'ing its
> non-existent page does not give any error. When the page is read, the
> process dies with a SIGBUS.
>
> This patch adds a file size check while initializing the trace data and
> makes sure that the file size matches the expected size; otherwise an
> error is returned.

Thanks Vaibhav,

I'll queue this up.

-- Steve


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/