diff options
| author | Arnd Bergmann <arnd@arndb.de> | 2024-06-20 18:23:04 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-07-27 10:40:19 +0200 |
| commit | cf704e7d04377e37ff377d28e9196a6c27003775 (patch) | |
| tree | 5739c5a487880cb9c3b0d3ccfd9bdbffff3c2ee9 | |
| parent | 134b12f0c590b1f30480bfedfba39e2c2f39a7eb (diff) | |
| download | linux-cf704e7d04377e37ff377d28e9196a6c27003775.tar.gz linux-cf704e7d04377e37ff377d28e9196a6c27003775.tar.bz2 linux-cf704e7d04377e37ff377d28e9196a6c27003775.zip | |
mips: fix compat_sys_lseek syscall
[ Upstream commit 0d5679a0aae2d8cda72169452c32e5cb88a7ab33 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
| -rw-r--r-- | arch/mips/kernel/syscalls/syscall_o32.tbl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/mips/kernel/syscalls/syscall_o32.tbl b/arch/mips/kernel/syscalls/syscall_o32.tbl index 6036af4f30e2..c262975484fa 100644 --- a/arch/mips/kernel/syscalls/syscall_o32.tbl +++ b/arch/mips/kernel/syscalls/syscall_o32.tbl @@ -27,7 +27,7 @@ 17 o32 break sys_ni_syscall # 18 was sys_stat 18 o32 unused18 sys_ni_syscall -19 o32 lseek sys_lseek +19 o32 lseek sys_lseek compat_sys_lseek 20 o32 getpid sys_getpid 21 o32 mount sys_mount 22 o32 umount sys_oldumount |
