[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/2] bsd-user: correct notion of return value
From: |
Maya Rashish |
Subject: |
[PATCH 2/2] bsd-user: correct notion of return value |
Date: |
Fri, 1 Apr 2022 11:13:09 +0000 |
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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH 2/2] bsd-user: correct notion of return value,
Maya Rashish <=