aboutsummaryrefslogtreecommitdiff
path: root/linux-user
diff options
context:
space:
mode:
authorRiku Voipio <riku.voipio@linaro.org>2014-04-23 11:26:34 +0300
committerRiku Voipio <riku.voipio@linaro.org>2014-06-17 08:52:07 +0300
commit9eeb8306d56e8fd831bbbac6e3cfe69a40312a33 (patch)
treecf2aec65a5b7021d91a9b0174dfb8681df395320 /linux-user
parent945473847b4bb0869915aa47dabc4d2abbc87bdb (diff)
signal/all/do_sigaltstack remove __get_user value check
Access is already checked in the lock_user_struct call before. Signed-off-by: Riku Voipio <riku.voipio@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'linux-user')
-rw-r--r--linux-user/signal.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/linux-user/signal.c b/linux-user/signal.c
index 2a1c681c7d..f55076d41e 100644
--- a/linux-user/signal.c
+++ b/linux-user/signal.c
@@ -619,11 +619,12 @@ abi_long do_sigaltstack(abi_ulong uss_addr, abi_ulong uoss_addr, abi_ulong sp)
struct target_sigaltstack ss;
ret = -TARGET_EFAULT;
- if (!lock_user_struct(VERIFY_READ, uss, uss_addr, 1)
- || __get_user(ss.ss_sp, &uss->ss_sp)
- || __get_user(ss.ss_size, &uss->ss_size)
- || __get_user(ss.ss_flags, &uss->ss_flags))
+ if (!lock_user_struct(VERIFY_READ, uss, uss_addr, 1)) {
goto out;
+ }
+ __get_user(ss.ss_sp, &uss->ss_sp);
+ __get_user(ss.ss_size, &uss->ss_size);
+ __get_user(ss.ss_flags, &uss->ss_flags);
unlock_user_struct(uss, uss_addr, 0);
ret = -TARGET_EPERM;