The o32 user space ABI sign extends the offset values. We need to undo this by masking out the high bits. Signed-off-by: David Daney <ddaney@xxxxxxxxxxxxxxxxxx> --- arch/mips/kernel/linux32.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/arch/mips/kernel/linux32.c b/arch/mips/kernel/linux32.c index 49aac6e..13fc173 100644 --- a/arch/mips/kernel/linux32.c +++ b/arch/mips/kernel/linux32.c @@ -137,7 +137,8 @@ SYSCALL_DEFINE5(32_llseek, unsigned long, fd, unsigned long, offset_high, unsigned long, offset_low, loff_t __user *, result, unsigned long, origin) { - return sys_llseek(fd, offset_high, offset_low, result, origin); + return sys_llseek(fd, offset_high & 0xffffffff, + offset_low & 0xffffffff, result, origin); } /* From the Single Unix Spec: pread & pwrite act like lseek to pos + op + -- 1.6.0.6