[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090403131629.GA8875@elte.hu>
Date: Fri, 3 Apr 2009 15:16:29 +0200
From: Ingo Molnar <mingo@...e.hu>
To: Lai Jiangshan <laijs@...fujitsu.com>
Cc: Steven Rostedt <srostedt@...hat.com>,
Frederic Weisbecker <fweisbec@...il.com>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 4/4] tracing: fix splice return too large
* Lai Jiangshan <laijs@...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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists