提交 9eeb8306 编写于 作者: R Riku Voipio

signal/all/do_sigaltstack remove __get_user value check

Access is already checked in the lock_user_struct
call before.
Signed-off-by: NRiku Voipio <riku.voipio@linaro.org>
Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
上级 94547384
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册