From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53893) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ceNCq-0000nU-Ew for qemu-devel@nongnu.org; Thu, 16 Feb 2017 09:38:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ceNCm-0002On-4s for qemu-devel@nongnu.org; Thu, 16 Feb 2017 09:38:48 -0500 Received: from mout.kundenserver.de ([212.227.17.10]:50981) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ceNCl-0002Nf-RK for qemu-devel@nongnu.org; Thu, 16 Feb 2017 09:38:44 -0500 From: Laurent Vivier Date: Thu, 16 Feb 2017 15:38:07 +0100 Message-Id: <20170216143816.2384-6-laurent@vivier.eu> In-Reply-To: <20170216143816.2384-1-laurent@vivier.eu> References: <20170216143816.2384-1-laurent@vivier.eu> Subject: [Qemu-devel] [PULL v2 05/14] linux-user: Fix readahead List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Riku Voipio , Lena Djokic , Riku Voipio From: Lena Djokic Calculation of 64-bit offset was not correct for all cases. Signed-off-by: Lena Djokic Reviewed-by: Peter Maydell Signed-off-by: Riku Voipio --- 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 fccd631..3e88dd1 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -11228,7 +11228,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, arg3 = arg4; arg4 = arg5; } - ret = get_errno(readahead(arg1, ((off64_t)arg3 << 32) | arg2, arg4)); + ret = get_errno(readahead(arg1, target_offset64(arg2, arg3) , arg4)); #else ret = get_errno(readahead(arg1, arg2, arg3)); #endif -- 2.9.3