mirror of
https://gitlab.com/qemu-project/qemu.git
synced 2025-10-30 07:57:14 +08:00
linux-user: Use target_restore_altstack in all sigreturn
Note that target_restore_altstack uses the host memory pointer that we have already verified, so TARGET_EFAULT is not a possible return value. Note that using -EFAULT was a bug. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20210426025334.1168495-3-richard.henderson@linaro.org> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
This commit is contained in:
committed by
Laurent Vivier
parent
92bad94836
commit
56384cf3ad
@ -260,11 +260,7 @@ long do_rt_sigreturn(CPUHexagonState *env)
|
||||
}
|
||||
|
||||
restore_ucontext(env, &frame->uc);
|
||||
|
||||
if (do_sigaltstack(frame_addr + offsetof(struct target_rt_sigframe,
|
||||
uc.uc_stack), 0, get_sp_from_cpustate(env)) == -EFAULT) {
|
||||
goto badframe;
|
||||
}
|
||||
target_restore_altstack(&frame->uc.uc_stack, get_sp_from_cpustate(env));
|
||||
|
||||
unlock_user_struct(frame, frame_addr, 0);
|
||||
return -TARGET_QEMU_ESIGRETURN;
|
||||
|
||||
Reference in New Issue
Block a user