From patchwork Sun Jul 15 19:52:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 944084 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=vivier.eu Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41THKs2zG3z9rxs for ; Mon, 16 Jul 2018 05:53:53 +1000 (AEST) Received: from localhost ([::1]:47345 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fen5b-000379-5W for incoming@patchwork.ozlabs.org; Sun, 15 Jul 2018 15:53:51 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54030) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fen51-00036j-UA for qemu-devel@nongnu.org; Sun, 15 Jul 2018 15:53:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fen4x-00065C-8n for qemu-devel@nongnu.org; Sun, 15 Jul 2018 15:53:16 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:36305) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fen4w-00061B-UI for qemu-devel@nongnu.org; Sun, 15 Jul 2018 15:53:11 -0400 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue104 [212.227.15.183]) with ESMTPSA (Nemesis) id 0LiUpQ-1gCkue1TCu-00cf7l; Sun, 15 Jul 2018 21:53:00 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Sun, 15 Jul 2018 21:52:40 +0200 Message-Id: <20180715195242.6645-3-laurent@vivier.eu> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180715195242.6645-1-laurent@vivier.eu> References: <20180715195242.6645-1-laurent@vivier.eu> X-Provags-ID: V03:K1:XekmDbCYgA+XenMYY2o5I6J3cmXay9xvSE12fIVtGXqi19cHV7n /0p075QkSPi0GaCNvn3g2rW9A9XZPoX8Dh6dyjct4vl0pWINuv5AtDPn0TgSSJ9B5AWcLfY SlFhy7sSzpU9OYKA3XsXz4I5hV5Th+TDzs4J9eVtqUX6xmN68JZedmr63h5m88bJW9oxMUI UxWbj17vN/Qn+/4gh0DTA== X-UI-Out-Filterresults: notjunk:1; V01:K0:HJ7mgP+knY4=:2NOfUcPBgpvvFWHRRbpmBR RjTJjG8tQEcCphf6TWysGohl/ONY4rqhwUp7uyAn++fxbtd1KsjBuBBjuPhJVmsXhJ9oiMr/H P5NuFyrw7Fcx1gjCAMxSWU1ehhKAqGKlXtVnn2zxuKI/w96DhI2CwZIP55Nj4djyEdr7sGYrZ /kNnTdpCTaDud7jQ83I8QvVaSofIqp6X5Ionh7wQxyuXLx8vZOSF7aZx7ydJQhuBJ5bz3OlgQ 798obzW8XGv/vcIGlt/KVZllpgzNVyoZH5cjEX6d7K6PyQ2/LRjwmsU22lodfBQAXEMeu6sfP S/e5Cx/JH+JgVviBZyppYfd0IEvrZ1jbnBW9HajvtIVM9MPfO46OfpU+lJ7KS9En2zH/CWRvL iNyPt173MQyLhUYiGihuPJdNzpCXfZ2zGzjOUMBl+DuiDyxdcT68tzmWI+P8iH602ikCXNk6W K3bib7sSVrxaeLr/Amw1HU2ok42qe7ZUqGWfxr83CBdhc/K0KQ/wwMOiPaPGt9euR8r5pMRe/ 9k95HoI9xfyJ/zPbJxMSqJE1b8bv0WWUob5xuUPpeI3EDZTWzUcVK4FOHADPS0/e6pqB4n25M b8PpeA+NGmQ67ShTT6jKqL3u0rCsQhghnuacoo2jz4nrftvMGKGQnT90/RZ1Z+kWXdf71q5Ll 4ZDFbsOaSZzmDZTkkBja9o7LQa1rqgCdxL4w3Ia6TGzctoY/6g9KJpn5PlqCpyCiqXj4= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.17.24 Subject: [Qemu-devel] [PULL 2/4] linux-user: convert remaining fcntl() to safe_fcntl() 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: Riku Voipio , Laurent Vivier Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Commit 435da5e709 didn't convert a fcntl() call to safe_fcntl() for TARGET_NR_fcntl64 case. There is no reason to not use it in this case. Fixes: 435da5e709 linux-user: Use safe_syscall wrapper for fcntl Signed-off-by: Laurent Vivier Message-Id: <20180713125805.10749-1-laurent@vivier.eu> --- 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 b8b7bced9f..aa4f3eb1c8 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -11764,7 +11764,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, if (ret) { break; } - ret = get_errno(fcntl(arg1, cmd, &fl)); + ret = get_errno(safe_fcntl(arg1, cmd, &fl)); if (ret == 0) { ret = copyto(arg3, &fl); }