From patchwork Mon Apr 2 17:13:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Filippov X-Patchwork-Id: 10320089 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DD144602C8 for ; Mon, 2 Apr 2018 17:16:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CDF6A28A31 for ; Mon, 2 Apr 2018 17:16:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C2C7A28A3A; Mon, 2 Apr 2018 17:16:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, FROM_LOCAL_NOVOWEL, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7242428A31 for ; Mon, 2 Apr 2018 17:16:08 +0000 (UTC) Received: from localhost ([::1]:49751 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f333v-0005oT-Ho for patchwork-qemu-devel@patchwork.kernel.org; Mon, 02 Apr 2018 13:16:07 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36506) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f332R-0004QK-2A for qemu-devel@nongnu.org; Mon, 02 Apr 2018 13:14:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f332Q-0004fr-7L for qemu-devel@nongnu.org; Mon, 02 Apr 2018 13:14:35 -0400 Received: from mail-wr0-x242.google.com ([2a00:1450:400c:c0c::242]:40368) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f332Q-0004fi-0h for qemu-devel@nongnu.org; Mon, 02 Apr 2018 13:14:34 -0400 Received: by mail-wr0-x242.google.com with SMTP id n2so11403831wrj.7 for ; Mon, 02 Apr 2018 10:14:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=qoLQPexePs9TPaq82SqDsEt7vvTBX1POIh552mg9exg=; b=X85IwWxCMzWrpcu4y8+yiwbi1WtTYm9VUNcFM2K9nu+LiQSts4r57Y/ruvLne73Z/T x6OGE93gKn7gqXqpVp1wgipGTEiS8H947v/kYTy98jlRZjSrXRQOMlwuj6JMeh0kY9PL 5DLot+Df04Uv8ksns9/9OsKvAuCHR29g1UysCV1nsUi3Ht0J9kKMwKaYUrbE2xtl/p5/ rJgDsQqgv4aAFS2J5KPTNad01zzhv+9d09pRKEo/IVzzq/kV6JdLYe7XRcrlcMfLMDNt 2LpQ/WjDFNnali8y47izYSraTW0uDkWNpUS+flixVkGV/v1pV7tRMmgCjekGzc2cVxj4 gq2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=qoLQPexePs9TPaq82SqDsEt7vvTBX1POIh552mg9exg=; b=I1bRYvA92AjE0EuI78Gh20AKTi9uuXzbXRXNL0WnAwmyOhATp6TSYt8mxAsi7FCYC5 5zynv/TexwV30w94hhCHboT4s3DEojB7mEuM4O9HiOtBAv+Fv+f7KjYraKpcZPG7WiTi FHA40KxBG06j2p4myO0zVUYbSZ/VSqYeaCGIiIUnVxxcDJhA/jHcSB/RPxJIzxn0Gv7K JvGR7f1vbHUdwsmeFYkk/xZripURc0RzzM5v1l7uGTTea1DURd29V4bGwyAIJ3Zwqw/w C3YvOIU3pcJUmv0AmxzPtVqa7uWzecTZ2Mxa0rAiIHE9U/WbVWrlSg/PyEEEjUn3EGlH +Blw== X-Gm-Message-State: ALQs6tB4eZrqWMivEiSQ6w0NOmlVFCJ9u8M6/RG/9W2BdKN/HMO3Dx83 rkQq1il2Rh2PhhAFypW06TjQew== X-Google-Smtp-Source: AIpwx48O9a9scFLfZzqXaVkZq+cNxR0F6Vu/jDcBQAK9AQJDGJr8S83ejNnkePoXEH4q0kKOv83aSg== X-Received: by 2002:a19:5745:: with SMTP id l66-v6mr6458285lfb.135.1522689272876; Mon, 02 Apr 2018 10:14:32 -0700 (PDT) Received: from octofox.cadence.com (jcmvbkbc-1-pt.tunnel.tserv24.sto1.ipv6.he.net. [2001:470:27:1fa::2]) by smtp.gmail.com with ESMTPSA id s87-v6sm142360lfk.69.2018.04.02.10.14.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Apr 2018 10:14:32 -0700 (PDT) From: Max Filippov To: qemu-devel@nongnu.org Date: Mon, 2 Apr 2018 10:13:52 -0700 Message-Id: <20180402171354.27706-7-jcmvbkbc@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180402171354.27706-1-jcmvbkbc@gmail.com> References: <20180402171354.27706-1-jcmvbkbc@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::242 Subject: [Qemu-devel] [PULL 6/8] linux-user: fix error propagation in clock_gettime X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Riku Voipio , Laurent Vivier , Max Filippov Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP host_to_target_timespec may return error if target address could not be locked, but it is ignored. Propagate return value of host_to_target_timespec to the caller of clock_gettime. Reviewed-by: Laurent Vivier Signed-off-by: Max Filippov --- 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 d51e2a00ee31..52e2f9c16479 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -11884,7 +11884,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, struct timespec ts; ret = get_errno(clock_gettime(arg1, &ts)); if (!is_error(ret)) { - host_to_target_timespec(arg2, &ts); + ret = host_to_target_timespec(arg2, &ts); } break; }