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: 1980 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 08DBC18818 for ; Thu, 16 Jun 2011 16:37:21 +0000 (UTC) Received: from mail-vw0-f52.google.com (mail-vw0-f52.google.com [209.85.212.52]) by fiordland.canonical.com (Postfix) with ESMTP id CADDCA188BA for ; Thu, 16 Jun 2011 16:37:20 +0000 (UTC) Received: by vws16 with SMTP id 16so560102vws.11 for ; Thu, 16 Jun 2011 09:37:20 -0700 (PDT) Received: by 10.52.162.72 with SMTP id xy8mr1583213vdb.87.1308242240315; Thu, 16 Jun 2011 09:37:20 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.52.183.130 with SMTP id em2cs199479vdc; Thu, 16 Jun 2011 09:37:20 -0700 (PDT) Received: by 10.213.103.203 with SMTP id l11mr516585ebo.55.1308242238490; Thu, 16 Jun 2011 09:37:18 -0700 (PDT) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk [81.2.115.146]) by mx.google.com with ESMTPS id t8si4995839eej.89.2011.06.16.09.37.17 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 16 Jun 2011 09:37:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) client-ip=81.2.115.146; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) smtp.mail=pm215@archaic.org.uk 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 Cc: patches@linaro.org, Juan Quintela , Riku Voipio Subject: [PATCH 3/8] linux-user: syscall should use sanitized arg1 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> 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; }