summaryrefslogtreecommitdiff
path: root/arch/mips/kernel/scall64-o32.S
diff options
context:
space:
mode:
authorYong Zhang <yong.zhang@windriver.com>2011-08-16 09:54:54 +0800
committerRalf Baechle <ralf@linux-mips.org>2011-09-21 17:53:44 +0200
commit1eec6cd08b4feb72a73aff468ab72bdd21e1dc61 (patch)
tree70278d81550236b2dc57ddb52b3fc3380fe0c5d9 /arch/mips/kernel/scall64-o32.S
parentb8ecf341f1b7ca7bf3cb80c48cbbae33b79947d0 (diff)
MIPS: Compat: Use 32-bit wrapper for compat_sys_futex.
We can't trust userspace to pass signed-extend arguments. Not correctly sign-extended arguments to futex-wait result in architecturally undefined operation of 32-bit arithmetic instructions. For example, if 'val' is too big and bit-31 is 1, the caller may enter endless loop at: futex_wait_setup() { ... if (uval != val) { queue_unlock(q, *hb); ret = -EWOULDBLOCK; ... } Signed-off-by: Yong Zhang <yong.zhang@windriver.com> To: linux-mips@linux-mips.org To: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/2714/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel/scall64-o32.S')
-rw-r--r--arch/mips/kernel/scall64-o32.S2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S
index 4d7c9827706f..1d813169e453 100644
--- a/arch/mips/kernel/scall64-o32.S
+++ b/arch/mips/kernel/scall64-o32.S
@@ -441,7 +441,7 @@ sys_call_table:
PTR sys_fremovexattr /* 4235 */
PTR sys_tkill
PTR sys_sendfile64
- PTR compat_sys_futex
+ PTR sys_32_futex
PTR compat_sys_sched_setaffinity
PTR compat_sys_sched_getaffinity /* 4240 */
PTR compat_sys_io_setup