From nobody Tue Feb 10 09:10:51 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1487255923826432.58835913616485; Thu, 16 Feb 2017 06:38:43 -0800 (PST) Received: from localhost ([::1]:47057 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ceNCj-0008U4-9J for importer@patchew.org; Thu, 16 Feb 2017 09:38:41 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48557) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ceMxT-0002ef-B1 for qemu-devel@nongnu.org; Thu, 16 Feb 2017 09:22:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ceMxS-0002NN-0e for qemu-devel@nongnu.org; Thu, 16 Feb 2017 09:22:55 -0500 Received: from mout.kundenserver.de ([217.72.192.74]:64491) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ceMxR-0002Ml-Ls for qemu-devel@nongnu.org; Thu, 16 Feb 2017 09:22:53 -0500 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue101 [212.227.15.183]) with ESMTPSA (Nemesis) id 0MBkiF-1cUhty3ZuZ-00Ambv; Thu, 16 Feb 2017 15:22:38 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Thu, 16 Feb 2017 15:22:23 +0100 Message-Id: <20170216142227.27448-11-laurent@vivier.eu> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170216142227.27448-1-laurent@vivier.eu> References: <20170216142227.27448-1-laurent@vivier.eu> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K0:r0Suwn+LBcmY6Ubj8JlPdE0YJfbmKUu8we9G4RJNHDBfDNz+gOS reXR3/Ynla4xGFPlkiZg147yxZGerb+Cy3Erwpjmt2fgyLzoHhMwDwa3M+xGqiL5CwQf8EL WQ87XSVpfmgTxhGnOVpORGtXShF2xUmDlzQhmkHhLUnFBLCid3Z3ZreyWIqRhhPBbAQVvi4 t2zFASYk3qDv30QLdhTfA== X-UI-Out-Filterresults: notjunk:1;V01:K0:4Ob5O+1SfcI=:+Q9XKu9nwvXfPZPtOgKW5t AXoBrpZOhLqQt1Lp+jYs55CThizAGgCXQ+hsKfRupue/3obMmkRtuFP4vycNtN2TuHvV8P7Hw OOAwiy9NCKF/IqeDczWDB7CxvQ/Nb9YZkywISYcb6KgOvqliGMidDtoRoabaz4+4N1PAJu0BD 5FxrL8FUxJhIbgVq6e0l0C4uBnNQRYbgQtMsOo2H75AhLz95DuSH27jVYxy/b/K9a5MdIEc1C NrPlsfsaQ7fSm/0LSpuPnIdb7fKdBvpaICaLCueGwdsoJPRNNBMFsiBbDl7VvC/Fy9C4NjwVC 7yt87f34jQrfHMTviXD5wYH3eBRCIyf+KnSwxekVmlGAcWdmSQRp3iX5QyIv6yGr9ArnHZlq6 QHOE+aGe5FhHKhH0O39dwmeq84+9RGmvqtgpnv4/sx3TbLwyr6mKjixZsdLOP2NrztsnIOVz5 K3XrfZaA2dd5kfLXxl6/ZGZbzJkWYj/n0jiLbJFkaEAfJSGr/Uz97cBIEZcY5fDXhVnHlb0mm i0PqirZ0GTQ+64E9xv8jeMwL4SmHnPXvLTHsen3W6blzaSkYEF0qES+EyZt8Jgw7amZxvG8Hi /SAZkbG88DM67+GqYWhX7tWcZWIQBKuVOpc8apFuoAGGKe5QPmHJfitQLgAVzW5ViiA9fI9Ti PhuF4K1qs0pzFDZ2LbhwITxrx+FtRVvcAv4F1sAVq+zvUBBzPRvyNY4daVtkhX2+qKl7zfCrS rGQDk+O+gsWLsyXD X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 217.72.192.74 Subject: [Qemu-devel] [PULL 10/14] linux-user: fix settime old value location 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: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Pranith Kumar , Riku Voipio , Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 From: Marc-Andr=C3=A9 Lureau old_value is the 4th argument of timer_settime(), not the 2nd. Signed-off-by: Marc-Andr=C3=A9 Lureau Signed-off-by: Pranith Kumar Reviewed-by: Laurent Vivier Message-Id: <20170119151533.29328-1-bobby.prani@gmail.com> Signed-off-by: Laurent Vivier --- linux-user/syscall.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index d982a27..f569f82 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -12043,10 +12043,14 @@ abi_long do_syscall(void *cpu_env, int num, abi_l= ong arg1, timer_t htimer =3D g_posix_timers[timerid]; struct itimerspec hspec_new =3D {{0},}, hspec_old =3D {{0},}; =20 - target_to_host_itimerspec(&hspec_new, arg3); + if (target_to_host_itimerspec(&hspec_new, arg3)) { + goto efault; + } ret =3D get_errno( timer_settime(htimer, arg2, &hspec_new, &hspec_o= ld)); - host_to_target_itimerspec(arg2, &hspec_old); + if (arg4 && host_to_target_itimerspec(arg4, &hspec_old)) { + goto efault; + } } break; } --=20 2.9.3