]> www.infradead.org Git - users/jedix/linux-maple.git/commit
compat: use sys_sendfile64() implementation for sendfile syscall
authorChris Metcalf <cmetcalf@tilera.com>
Mon, 26 Mar 2012 20:26:12 +0000 (16:26 -0400)
committerMaxim Uvarov <maxim.uvarov@oracle.com>
Wed, 4 Apr 2012 21:36:58 +0000 (14:36 -0700)
commit12e0fa56febd5a825f20498f5b82a0943de4894a
treea8dc60f1e8b6fcdfbdfca0ce8d12af5e43aa171b
parentfd17147ed82447d5f71c98f7eefba1b0122c1bf9
compat: use sys_sendfile64() implementation for sendfile syscall

commit 1631fcea8399da5e80a80084b3b8c5bfd99d21e7 upstream.

<asm-generic/unistd.h> was set up to use sys_sendfile() for the 32-bit
compat API instead of sys_sendfile64(), but in fact the right thing to
do is to use sys_sendfile64() in all cases.  The 32-bit sendfile64() API
in glibc uses the sendfile64 syscall, so it has to be capable of doing
full 64-bit operations.  But the sys_sendfile() kernel implementation
has a MAX_NON_LFS test in it which explicitly limits the offset to 2^32.
So, we need to use the sys_sendfile64() implementation in the kernel
for this case.

Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/asm-generic/unistd.h