From patchwork Mon Jun 20 16:20:17 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 101153 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 65B0EB6F80 for ; Tue, 21 Jun 2011 02:46:11 +1000 (EST) Received: from localhost ([::1]:46980 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QYhbz-0000yJ-KQ for incoming@patchwork.ozlabs.org; Mon, 20 Jun 2011 12:46:07 -0400 Received: from eggs.gnu.org ([140.186.70.92]:58578) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QYhDe-0003Z7-0r for qemu-devel@nongnu.org; Mon, 20 Jun 2011 12:20:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QYhDc-0008PK-Mc for qemu-devel@nongnu.org; Mon, 20 Jun 2011 12:20:57 -0400 Received: from afflict.kos.to ([92.243.29.197]:34634) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QYhDc-0008P7-DI for qemu-devel@nongnu.org; Mon, 20 Jun 2011 12:20:56 -0400 Received: from kos.to (a88-115-163-181.elisa-laajakaista.fi [88.115.163.181]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by afflict.kos.to (Postfix) with ESMTPSA id 982AE26689; Mon, 20 Jun 2011 16:20:54 +0000 (UTC) Received: by kos.to (sSMTP sendmail emulation); Mon, 20 Jun 2011 19:20:53 +0300 From: riku.voipio@iki.fi To: qemu-devel@nongnu.org Date: Mon, 20 Jun 2011 19:20:17 +0300 Message-Id: <7fa10eeb2066390526974ead1351ce117e4c5f06.1308583801.git.riku.voipio@iki.fi> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 92.243.29.197 Cc: Juan Quintela Subject: [Qemu-devel] [PATCH 12/18] 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 Signed-off-by: Riku Voipio --- 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 57d9233..1c0503f 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -7181,7 +7181,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) { @@ -7200,7 +7200,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; }