[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v8 03/17] linux-user: Do not call get_errno() in do_brk()
From: |
Richard Henderson |
Subject: |
[PATCH v8 03/17] linux-user: Do not call get_errno() in do_brk() |
Date: |
Thu, 3 Aug 2023 18:45:03 -0700 |
From: Akihiko Odaki <akihiko.odaki@daynix.com>
Later the returned value is compared with -1, and negated errno is not
expected.
Fixes: 00faf08c95 ("linux-user: Don't use MAP_FIXED in do_brk()")
Reviewed-by: Helge Deller <deller@gmx.de>
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Message-Id: <20230802071754.14876-4-akihiko.odaki@daynix.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
linux-user/syscall.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 95727a816a..b9d2ec02f9 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -862,9 +862,9 @@ abi_long do_brk(abi_ulong brk_val)
*/
if (new_host_brk_page > brk_page) {
new_alloc_size = new_host_brk_page - brk_page;
- mapped_addr = get_errno(target_mmap(brk_page, new_alloc_size,
- PROT_READ|PROT_WRITE,
- MAP_ANON|MAP_PRIVATE, 0, 0));
+ mapped_addr = target_mmap(brk_page, new_alloc_size,
+ PROT_READ|PROT_WRITE,
+ MAP_ANON|MAP_PRIVATE, 0, 0);
} else {
new_alloc_size = 0;
mapped_addr = brk_page;
--
2.34.1
- Re: [PATCH v8 15/17] linux-user: Do not adjust image mapping for host page size, (continued)
- [PATCH v8 04/17] linux-user: Use MAP_FIXED_NOREPLACE for do_brk(), Richard Henderson, 2023/08/03
- [PATCH v8 12/17] linux-user: Use elf_et_dyn_base for ET_DYN with interpreter, Richard Henderson, 2023/08/03
- [PATCH v8 11/17] linux-user: Use MAP_FIXED_NOREPLACE for initial image mmap, Richard Henderson, 2023/08/03
- [PATCH v8 06/17] linux-user: Do not align brk with host page size, Richard Henderson, 2023/08/03
- [PATCH v8 03/17] linux-user: Do not call get_errno() in do_brk(),
Richard Henderson <=
- [PATCH v8 09/17] linux-user: Define TASK_UNMAPPED_BASE in $guest/target_mman.h, Richard Henderson, 2023/08/03
- [PATCH v8 16/17] linux-user: Do not adjust zero_bss for host page size, Richard Henderson, 2023/08/03
- [PATCH v8 07/17] linux-user: Remove last_brk, Richard Henderson, 2023/08/03
- [PATCH v8 01/17] linux-user: Unset MAP_FIXED_NOREPLACE for host, Richard Henderson, 2023/08/03