Message ID | 1415637969-47244-2-git-send-email-agraf@suse.de |
---|---|
State | New |
Headers | show |
diff --git a/linux-user/syscall.c b/linux-user/syscall.c index a175cc1..f3e22c8 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -9604,7 +9604,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, if (!lock_user_struct(VERIFY_WRITE, ptarget_timer, arg3, 1)) { goto efault; } - ptarget_timer->ptr = tswap32(0xcafe0000 | timer_index); + ptarget_timer->ptr = tswapl(0xcafe0000 | timer_index); unlock_user_struct(ptarget_timer, arg3, 1); } }
The timer pointer field we're writing a new timer ID into is of field abi_ulong which means we need to swab 64bits on 64bit ABI targets. Change the tswap from 32 to l to give us correct foreign-endian results. Signed-off-by: Alexander Graf <agraf@suse.de> --- linux-user/syscall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)