All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/2] bsd-user: correct notion of return value
@ 2022-04-01 11:13 Maya Rashish
  0 siblings, 0 replies; only message in thread
From: Maya Rashish @ 2022-04-01 11:13 UTC (permalink / raw)
  To: qemu-devel

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



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-04-01 14:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-01 11:13 [PATCH 2/2] bsd-user: correct notion of return value Maya Rashish

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.