From: Maya Rashish <coypu@sdf.org>
To: qemu-devel@nongnu.org
Subject: [PATCH 2/2] bsd-user: correct notion of return value
Date: Fri, 1 Apr 2022 11:13:09 +0000 [thread overview]
Message-ID: <YkbeRTGfQFgfSyfw@SDF.ORG> (raw)
Fix EFAULT at startup.
Signed-off-by: Maya Rashish <coypu@sdf.org>
---
bsd-user/netbsd/target_os_stack.h | 2 +-
bsd-user/openbsd/target_os_stack.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/bsd-user/netbsd/target_os_stack.h b/bsd-user/netbsd/target_os_stack.h
index 503279c1a9..f3cfbe8626 100644
--- a/bsd-user/netbsd/target_os_stack.h
+++ b/bsd-user/netbsd/target_os_stack.h
@@ -40,7 +40,7 @@ static inline int setup_initial_stack(struct bsd_binprm *bprm, abi_ulong *p,
for (i = 0; i < MAX_ARG_PAGES; i++) {
if (bprm->page[i]) {
info->rss++;
- if (!memcpy_to_target(stack_base, bprm->page[i],
+ if (memcpy_to_target(stack_base, bprm->page[i],
TARGET_PAGE_SIZE)) {
errno = EFAULT;
return -1;
diff --git a/bsd-user/openbsd/target_os_stack.h b/bsd-user/openbsd/target_os_stack.h
index 4b37955d3b..3f799ef5d1 100644
--- a/bsd-user/openbsd/target_os_stack.h
+++ b/bsd-user/openbsd/target_os_stack.h
@@ -40,7 +40,7 @@ static inline int setup_initial_stack(struct bsd_binprm *bprm, abi_ulong *p,
for (i = 0; i < MAX_ARG_PAGES; i++) {
if (bprm->page[i]) {
info->rss++;
- if (!memcpy_to_target(stack_base, bprm->page[i],
+ if (memcpy_to_target(stack_base, bprm->page[i],
TARGET_PAGE_SIZE)) {
errno = EFAULT;
return -1;
--
2.35.1
reply other threads:[~2022-04-01 14:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=YkbeRTGfQFgfSyfw@SDF.ORG \
--to=coypu@sdf.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.