[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 01/24] linux-user: Use assert in mmap_fork_start
From: |
Richard Henderson |
Subject: |
[PATCH 01/24] linux-user: Use assert in mmap_fork_start |
Date: |
Fri, 30 Jun 2023 15:21:36 +0200 |
Assert is preferred over if+abort for the error message.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
linux-user/mmap.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/linux-user/mmap.c b/linux-user/mmap.c
index 0aa8ae7356..83cbcce769 100644
--- a/linux-user/mmap.c
+++ b/linux-user/mmap.c
@@ -49,8 +49,7 @@ bool have_mmap_lock(void)
/* Grab lock to make sure things are in a consistent state after fork(). */
void mmap_fork_start(void)
{
- if (mmap_lock_count)
- abort();
+ assert(mmap_lock_count == 0);
pthread_mutex_lock(&mmap_mutex);
}
--
2.34.1
- [PATCH for-8.1? 00/24] linux-user: mmap range fixes, Richard Henderson, 2023/06/30
- [PATCH 01/24] linux-user: Use assert in mmap_fork_start,
Richard Henderson <=
- [PATCH 02/24] linux-user: Fix formatting of mmap.c, Richard Henderson, 2023/06/30
- [PATCH 06/24] linux-user: Populate more bits in mmap_flags_tbl, Richard Henderson, 2023/06/30
- [PATCH 04/24] linux-user: Split TARGET_MAP_* out of syscall_defs.h, Richard Henderson, 2023/06/30
- [PATCH 07/24] accel/tcg: Introduce page_check_range_empty, Richard Henderson, 2023/06/30
- [PATCH 03/24] linux-user/strace: Expand struct flags to hold a mask, Richard Henderson, 2023/06/30
- [PATCH 05/24] linux-user: Split TARGET_PROT_* out of syscall_defs.h, Richard Henderson, 2023/06/30
- [PATCH 08/24] bsd-user: Use page_check_range_empty for MAP_EXCL, Richard Henderson, 2023/06/30
- [PATCH 11/24] linux-user: Widen target_mmap offset argument to off_t, Richard Henderson, 2023/06/30