lkml.org 
[lkml]   [2009]   [Apr]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/4] tracing: fix splice return too large

* Lai Jiangshan <laijs@cn.fujitsu.com> wrote:

> - for (i = 0; i < PIPE_BUFFERS && len; i++, len -= size) {
> + if (*ppos & (PAGE_SIZE - 1)) {
> + WARN_ONCE(1, "Ftrace: previous read must page-align\n");
> + return -EINVAL;
> + }
> +
> + if (len & (PAGE_SIZE - 1)) {
> + WARN_ONCE(1, "Ftrace: splice_read should page-align\n");
> + if (len < PAGE_SIZE)
> + return -EINVAL;
> + len &= PAGE_MASK;
> + }

Hm, the fix looks good, but is it a good idea to allow the
triggering of this message from user-space?

Ingo


\
 
 \ /
  Last update: 2009-04-03 15:19    [W:0.062 / U:24.456 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site