From patchwork Thu Jun 16 16:37:10 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 100682 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id F35BAB6F7D for ; Fri, 17 Jun 2011 04:48:02 +1000 (EST) Received: from localhost ([::1]:59785 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QXHbi-0002e0-F1 for incoming@patchwork.ozlabs.org; Thu, 16 Jun 2011 14:47:58 -0400 Received: from eggs.gnu.org ([140.186.70.92]:57127) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QXFZL-0002kc-UY for qemu-devel@nongnu.org; Thu, 16 Jun 2011 12:37:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QXFZK-0005Id-5Z for qemu-devel@nongnu.org; Thu, 16 Jun 2011 12:37:23 -0400 Received: from mnementh.archaic.org.uk ([81.2.115.146]:50682) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QXFZJ-0005Hn-Ng for qemu-devel@nongnu.org; Thu, 16 Jun 2011 12:37:21 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1QXFZD-00029m-6j; Thu, 16 Jun 2011 17:37:15 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Thu, 16 Jun 2011 17:37:10 +0100 Message-Id: <1308242235-8261-4-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1308242235-8261-1-git-send-email-peter.maydell@linaro.org> References: <1308242235-8261-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 81.2.115.146 Cc: Riku Voipio , Juan Quintela , patches@linaro.org Subject: [Qemu-devel] [PATCH 3/8] linux-user: syscall should use sanitized arg1 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Juan Quintela Looking at the other architectures, we should be using "how" not "arg1". Signed-off-by: Juan Quintela [peter.maydell@linaro.org: remove unnecessary initialisation of how] Signed-off-by: Peter Maydell --- linux-user/syscall.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index f3d03b0..2635b75 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -7058,7 +7058,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, case TARGET_NR_osf_sigprocmask: { abi_ulong mask; - int how = arg1; + int how; sigset_t set, oldset; switch(arg1) { @@ -7077,7 +7077,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, } mask = arg2; target_to_host_old_sigset(&set, &mask); - sigprocmask(arg1, &set, &oldset); + sigprocmask(how, &set, &oldset); host_to_target_old_sigset(&mask, &oldset); ret = mask; }