git: f5f296477da5 - stable/15 - kern_execve.c: simplify execve_block_wait()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 17 Jul 2026 01:36:06 UTC
The branch stable/15 has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=f5f296477da5c54602b5394894c106d5fdda44e2
commit f5f296477da5c54602b5394894c106d5fdda44e2
Author: Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-07-10 10:05:13 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-07-17 00:16:40 +0000
kern_execve.c: simplify execve_block_wait()
(cherry picked from commit 8a365723923e4eadad962d9c7e8162dfbfe3e78c)
---
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 89141c979d07..9dedd60ce4fa 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