From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56735) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W1uyc-0002Tj-KB for qemu-devel@nongnu.org; Sat, 11 Jan 2014 04:35:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W1uyU-0004Lh-1y for qemu-devel@nongnu.org; Sat, 11 Jan 2014 04:35:34 -0500 From: pavel.zbitskiy@gmail.com Date: Sat, 11 Jan 2014 13:34:10 +0400 Message-Id: <1389432851-11420-3-git-send-email-pavel.zbitskiy@gmail.com> In-Reply-To: <1389432851-11420-1-git-send-email-pavel.zbitskiy@gmail.com> References: <1389432851-11420-1-git-send-email-pavel.zbitskiy@gmail.com> Subject: [Qemu-devel] [PATCH 2/3] linux-user: fixed getsockopt() optlen List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, Pavel Zbitskiy From: Pavel Zbitskiy optlen parameter of getsockopt() of type socklen_t* was read into variable of type socklen_t, that caused zeroing out of upper 4 bytes when running s390x on top of x86_64. This patch changes optlen type to abi_ulong. Signed-off-by: Pavel Zbitskiy --- linux-user/syscall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 4a14a43..c2cd2b4 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -2389,7 +2389,7 @@ static abi_long do_socketcall(int num, abi_ulong vptr) abi_ulong level; abi_ulong optname; abi_ulong optval; - socklen_t optlen; + abi_ulong optlen; if (get_user_ual(sockfd, vptr) || get_user_ual(level, vptr + n) -- 1.7.10.4