diff mbox

[12/14] linux-user: syscall should use sanitized arg1

Message ID 5927cd5a12edfaef558e77c5078f79ce9f22397e.1307014902.git.quintela@redhat.com
State New
Headers show

Commit Message

Juan Quintela June 2, 2011, 11:53 a.m. UTC
Looking at the other architectures, we should be using "how" not "arg1".

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 linux-user/syscall.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Peter Maydell June 10, 2011, 5:13 p.m. UTC | #1
On 2 June 2011 12:53, Juan Quintela <quintela@redhat.com> wrote:
> Looking at the other architectures, we should be using "how" not "arg1".
>
> Signed-off-by: Juan Quintela <quintela@redhat.com>

OK as far as it goes, but I think we should also change the
  int how = arg1;

to just 'int how;' while we're cleaning up this chunk of code.

-- PMM
diff mbox

Patch

diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index f3d03b0..c90fcc2 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -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;
         }