Skip to contentSkip to conversation

linux-user: declare sys_futex to have 6 arguments

PATCH Applied Petar Jovanovic 3 participants 3 messages Jul 15, 2013 – Jul 16, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 linux-user: declare sys_futex to have 6 arguments

From: Petar Jovanovic <[email protected]>

sys_futex has 6 arguments, and all of these need to be copied. Fix incorrect declaration in the mips_syscall_args array.

This change fixes the cases where the 5th and 6th arguments have non-zero value and have importance. An example is a Linux implementation of pthread_cond_wait() function.

---
 linux-user/main.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
linux-user/main.c +1 -1
index 7f15d3d..99c3b3f 100644
@@ -2028,7 +2028,7 @@ static const uint8_t mips_syscall_args[] = {
 	MIPS_SYS(sys_fremovexattr, 2)	/* 4235 */
 	MIPS_SYS(sys_tkill	, 2)
 	MIPS_SYS(sys_sendfile64	, 5)
-	MIPS_SYS(sys_futex	, 2)
+	MIPS_SYS(sys_futex	, 6)
 	MIPS_SYS(sys_sched_setaffinity, 3)
 	MIPS_SYS(sys_sched_getaffinity, 3)	/* 4240 */
 	MIPS_SYS(sys_io_setup	, 2)
Signature · 1 line
1.7.9.5
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · Petar Jovanovic

From: Petar Jovanovic <[email protected]>

sys_futex has 6 arguments, and all of these need to be copied. Fix incorrect declaration in the mips_syscall_args array.

This change fixes the cases where the 5th and 6th arguments have non-zero value and have importance. An example is a Linux implementation of pthread_cond_wait() function.

This is the QEMU version of a bug fixed in the Linux kernel by commit 90a67b590 in 2005...

thanks
-- PMM