From patchwork Sun Apr 1 20:37:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Filippov X-Patchwork-Id: 10319231 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 165F760375 for ; Sun, 1 Apr 2018 20:39:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0541928DD0 for ; Sun, 1 Apr 2018 20:39:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ED38728E45; Sun, 1 Apr 2018 20:39:37 +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 8B22028DD0 for ; Sun, 1 Apr 2018 20:39:37 +0000 (UTC) Received: from localhost ([::1]:33434 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f2jlI-00086m-Rd for patchwork-qemu-devel@patchwork.kernel.org; Sun, 01 Apr 2018 16:39:36 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40758) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f2jjp-00073A-RG for qemu-devel@nongnu.org; Sun, 01 Apr 2018 16:38:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f2jjp-0004Z2-1d for qemu-devel@nongnu.org; Sun, 01 Apr 2018 16:38:05 -0400 Received: from mail-lf0-x244.google.com ([2a00:1450:4010:c07::244]:39204) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f2jjo-0004YE-Pb for qemu-devel@nongnu.org; Sun, 01 Apr 2018 16:38:04 -0400 Received: by mail-lf0-x244.google.com with SMTP id p142-v6so18286054lfd.6 for ; Sun, 01 Apr 2018 13:38:04 -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; bh=vjiQG18yl1Ek6m2Na+JFMlv54rsQ7LnJTLfuYPqLLCk=; b=ctfm6RTa6pz7Qa2zEuhACxvPBmaxLWxP88xYBHTSZ/u96NnF8lCrOvzy8e3hmU6g/j IvQCEj7DoOT8mgiQd760iqOk2qFdNAahq00VDRwygc1wR6VptDV2VBu1NT1x3Y2YYuN8 D9i+/zIUBWg981oGyQhB/AbX75UPbYLlZRtRAguIemu21q6LHq7Eu0MZGF1cQETQq66D pdDJsC40/plYZSizoUxf/mYUSk8I625h/sOWTC8h/uvbRI0UoGlw5jlOsohhgr1B4kGP oF3kL7D+1gnOFnygxqWBSP8c6BA/+4mKlKFMLE7zDjBVQPxLF5oItZmNP1ZUxccPXYAz ui8g== 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; bh=vjiQG18yl1Ek6m2Na+JFMlv54rsQ7LnJTLfuYPqLLCk=; b=B7qicWWjmvdbw5lfH6bX7kbXpsFquZ3iqEJgUG1eAJbEMMzL5n26fL161nVYQStKun 4PkUvMXnnLt50WG2mU1E0LGhUGFts8CS13PSTFYFdsuoGPD9x4/WCcwB/eVBy+ynSqwJ 3NIV91mJ3PswDomr9vrJQ12s73XEd8Epss9N0VaT2IjNokrYEp4xvXOySacLN0Ft61nA 4IzPCujCoQKWrZcyd9RYO9NcfIsmHWOw2BKFLJJzrvrhBdKAbcD+MzBJ19qEwIKDM4SV HQ8M/VjwAK9S/sp4++gipRWGT5WgEvgQ3ujT7j1ArTes/JnEJ4Ufm8DRBvh9y1fEheM4 qGDg== X-Gm-Message-State: ALQs6tB759W59gei3Wr1zgTGkawApavuy+2WDrlaf6q5E3ih1fyKMVcI vnt7qG0+7o/pIMfa5cB50vbnmA== X-Google-Smtp-Source: AIpwx49xsXmB4aqUaec+L4oe5iCFeiHmIFC/+XSthvcslKByyQagjrH7PIQ+Q0GiHevNQPHAu9smew== X-Received: by 2002:a19:b2d1:: with SMTP id t78-v6mr4365308lfk.78.1522615083327; Sun, 01 Apr 2018 13:38:03 -0700 (PDT) Received: from octofox.hsd1.ca.comcast.net. (jcmvbkbc-1-pt.tunnel.tserv24.sto1.ipv6.he.net. [2001:470:27:1fa::2]) by smtp.gmail.com with ESMTPSA id u77-v6sm518707lfi.0.2018.04.01.13.38.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 01 Apr 2018 13:38:02 -0700 (PDT) From: Max Filippov To: qemu-devel@nongnu.org Date: Sun, 1 Apr 2018 13:37:39 -0700 Message-Id: <20180401203739.31670-1-jcmvbkbc@gmail.com> X-Mailer: git-send-email 2.11.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4010:c07::244 Subject: [Qemu-devel] [PATCH] 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: Max Filippov , Riku Voipio , Laurent Vivier 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. Signed-off-by: Max Filippov Reviewed-by: Laurent Vivier --- 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; }