Re: [PATCH] Limit sendfile() to 2^31-PAGE_CACHE_SIZE bytes withouterror
From: Linus Torvalds
Date: Wed Jan 04 2006 - 13:39:38 EST
On Wed, 4 Jan 2006, Linus Torvalds wrote:
>
> On Tue, 3 Jan 2006, H. Peter Anvin wrote:
> >
> > (I set the limit to 2^31-PAGE_CACHE_SIZE so that a transfer that starts at the
> > beginning of the file will continue to be page-aligned.)
>
> Ok, this patch looks ok, if it's confirmed to unbreak apache.
Actually, looking closer, this patch does the wrong thing for a size_t
that is negative in ssize_t (which is technically "undefined behaviour" in
POSIX, but turning it into a big positive number is objectively worse than
returning -EINVAL).
Linus
-
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/