From: Yong Zhang Date: Tue, 16 Aug 2011 01:54:54 +0000 (+0800) Subject: MIPS: Compat: Use 32-bit wrapper for compat_sys_futex. X-Git-Tag: v3.1-rc10~17^2~7 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1eec6cd08b4feb72a73aff468ab72bdd21e1dc61;p=pandora-kernel.git 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 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 --- Reading git-diff-tree failed