]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
MIPS: Compat: Zero upper 32-bit of offset_high and offset_low.
authorRalf Baechle <ralf@linux-mips.org>
Wed, 1 Apr 2009 17:23:38 +0000 (11:23 -0600)
committerChris Wright <chrisw@sous-sol.org>
Mon, 27 Apr 2009 17:36:51 +0000 (10:36 -0700)
upstream commit: d6c178e9694e7e0c7ffe0289cf4389a498cac735

Through sys_llseek() arguably should do exactly that it doesn't which
means llseek(2) will fail for o32 processes if offset_low has bit 31 set.

As suggested by Heiko Carstens.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
arch/mips/kernel/linux32.c

index 1a86f84fa9470f31030c53fdc9ad45c792d08425..5abcc7f93e2f5d4dfe4389e4951d8e5877111fe0 100644 (file)
@@ -134,9 +134,9 @@ SYSCALL_DEFINE4(32_ftruncate64, unsigned long, fd, unsigned long, __dummy,
        return sys_ftruncate(fd, merge_64(a2, a3));
 }
 
-SYSCALL_DEFINE5(32_llseek, unsigned long, fd, unsigned long, offset_high,
-       unsigned long, offset_low, loff_t __user *, result,
-       unsigned long, origin)
+SYSCALL_DEFINE5(32_llseek, unsigned int, fd, unsigned int, offset_high,
+               unsigned int, offset_low, loff_t __user *, result,
+               unsigned int, origin)
 {
        return sys_llseek(fd, offset_high, offset_low, result, origin);
 }