Skip to content

Commit 0d5679a

Browse files
arndbtsbogend
authored andcommitted
mips: fix compat_sys_lseek syscall
This is almost compatible, but passing a negative offset should result in a EINVAL error, but on mips o32 compat mode would seek to a large 32-bit byte offset. Use compat_sys_lseek() to correctly sign-extend the argument. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
1 parent 4a3e37b commit 0d5679a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/mips/kernel/syscalls/syscall_o32.tbl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
17 o32 break sys_ni_syscall
2828
# 18 was sys_stat
2929
18 o32 unused18 sys_ni_syscall
30-
19 o32 lseek sys_lseek
30+
19 o32 lseek sys_lseek compat_sys_lseek
3131
20 o32 getpid sys_getpid
3232
21 o32 mount sys_mount
3333
22 o32 umount sys_oldumount

0 commit comments

Comments
 (0)