From: Richard Henderson <richard.henderson@linaro.org>
To: qemu-devel@nongnu.org
Cc: laurent@vivier.eu
Subject: [PATCH 1/4] linux-user: Do not special-case NULL for PR_GET_PDEATHSIG
Date: Thu, 6 Jan 2022 14:57:35 -0800 [thread overview]
Message-ID: <20220106225738.103012-2-richard.henderson@linaro.org> (raw)
In-Reply-To: <20220106225738.103012-1-richard.henderson@linaro.org>
The kernel does not special-case arg2 != NULL, so
neither should we.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
linux-user/syscall.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index ce9d64896c..e8f9e0643e 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -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;
--
2.25.1
next prev parent reply other threads:[~2022-01-06 23:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-06 22:57 [PATCH 0/4] linux-user: prctl follow-ups Richard Henderson
2022-01-06 22:57 ` Richard Henderson [this message]
2022-01-08 17:10 ` [PATCH 1/4] linux-user: Do not special-case NULL for PR_GET_PDEATHSIG Laurent Vivier
2022-01-08 17:13 ` Laurent Vivier
2022-01-06 22:57 ` [PATCH 2/4] linux-user: Map signal number in PR_GET_PDEATHSIG Richard Henderson
2022-01-07 14:01 ` Philippe Mathieu-Daudé
2022-01-06 22:57 ` [PATCH 3/4] linux-user: Implement PR_SET_PDEATHSIG Richard Henderson
2022-01-08 17:15 ` Laurent Vivier
2022-01-06 22:57 ` [PATCH 4/4] linux-user: Implement capability prctls Richard Henderson
2022-01-08 17:17 ` Laurent Vivier
2022-01-08 18:06 ` [PATCH 0/4] linux-user: prctl follow-ups Laurent Vivier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220106225738.103012-2-richard.henderson@linaro.org \
--to=richard.henderson@linaro.org \
--cc=laurent@vivier.eu \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).