linux-user: Do not special-case NULL for PR_GET_PDEATHSIG

The kernel does not special-case arg2 != NULL, so
neither should we.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20220106225738.103012-2-richard.henderson@linaro.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
This commit is contained in:
Richard Henderson 2022-01-06 14:57:35 -08:00 committed by Laurent Vivier
parent 72f692694f
commit 08f5f97349
1 changed files with 1 additions and 1 deletions

View File

@ -6444,7 +6444,7 @@ static abi_long do_prctl(CPUArchState *env, abi_long option, abi_long arg2,
int deathsig;
ret = get_errno(prctl(PR_GET_PDEATHSIG, &deathsig,
arg3, arg4, arg5));
if (!is_error(ret) && arg2 && put_user_s32(deathsig, arg2)) {
if (!is_error(ret) && put_user_s32(deathsig, arg2)) {
return -TARGET_EFAULT;
}
return ret;