git: 8a365723923e - main - kern_execve.c: simplify execve_block_wait()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 10 Jul 2026 20:36:48 UTC
The branch main has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=8a365723923e4eadad962d9c7e8162dfbfe3e78c
commit 8a365723923e4eadad962d9c7e8162dfbfe3e78c
Author: Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-07-10 10:05:13 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-07-10 20:36:17 +0000
kern_execve.c: simplify execve_block_wait()
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D58147
---
sys/kern/kern_exec.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c
index 03a05c6cc041..35eb22e03f48 100644
--- a/sys/kern/kern_exec.c
+++ b/sys/kern/kern_exec.c
@@ -414,17 +414,11 @@ execve_block(struct thread *td, struct proc *p)
void
execve_block_wait(struct thread *td, struct proc *p)
{
- bool first;
-
PROC_ASSERT_HELD(p);
PROC_LOCK_ASSERT(p, MA_OWNED);
- for (first = true;; first = false) {
- if (!first)
- PROC_LOCK(p);
- if (execve_block(td, p))
- return;
- }
+ while (!execve_block(td, p))
+ PROC_LOCK(p);
}
void