diff mbox

[PULL,07/18] signal/all/do_sigaltstack remove __get_user value check

Message ID d431bb7208d43a0e8130fd9309e35d610acd8894.1402317549.git.riku.voipio@linaro.org
State Superseded
Headers show

Commit Message

Riku Voipio June 9, 2014, 12:46 p.m. UTC
From: Riku Voipio <riku.voipio@linaro.org>

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>
---
 linux-user/signal.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
diff mbox

Patch

diff --git a/linux-user/signal.c b/linux-user/signal.c
index addf3c8..4a8d1d2 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;