From nobody Fri Jul 10 20:36:48 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gxkCB0LJ1z6d391 for ; Fri, 10 Jul 2026 20:36:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gxkC95wW4z43yV for ; Fri, 10 Jul 2026 20:36:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783715813; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KyRvaFog4xt/Yxp6WvI72Evr/3tWWarR3Irk/AQ4/tk=; b=oQwYrm7OEWqQOH+PDsKCLkyqT5Nml451qYdk+NIkZY2gNbMvBhib34sRfzxb6DI94Qd87g i6LKK/Ujchw5XK+/2j4u5iIxuVZczQ8iga66As9fYm0T73E98jDRauTzUvcEO4ONYgdxT5 VLpAyNpEpYfHWoPekD6GTsbjuTUE74P5ueVuBtIIZRID/jUrXHcz8/iRq36zCTvECZEcr6 gO+DiCb86vAZzzI6GaKa6vMxVHvq7nlVtP4rw9c+u+TAboxOvCVMkSlyg6yjo9vVfBAC3a N6ugtgP1zbN0AlOCIL/I2ojRMzAoqCgPM0ND13jc0jRWLzznXcBdjg+buG5LYg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1783715813; a=rsa-sha256; cv=none; b=kmvoYO/1YBawFZJOApmYgxMMiu2B7/V90Kk4xb1QbO7FxUjVa06IEH2ngJOt5HG4FMUBgi IwrAa3FoJ3kB2Clukj2xMflxFYft5Qq2lYlJ4AJbH72axinw+CDqzyGhrHmFWd+sfiRDav 3r5qEsxPLu+mpGBjwoRX+Ggw9Z9WGx+xAeyfMV8WCX3WoOGLXQYRHeuKmb18DVgyHtvTRS epZz3zCALPl//CMDtDQCKWMqlVHOmuL6zEFnoyJGMMHhXf1woVT9/j4mkhbQ8McJpGgSoy iZjzkjh0f6OhWasgu6SgOSouLVpp3yf0yEcPbJrmHQDOLccNIF/PHynIi9HKPg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1783715813; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KyRvaFog4xt/Yxp6WvI72Evr/3tWWarR3Irk/AQ4/tk=; b=f6BCyecB2JBUOt1iaSjUYzBxwiPrUa4RtOx0NGsKgOs5r+Dnj82f4pce8FCP/5sgzRcg/H TmeVaKVJOfATrlgsR8xfj4Z1J/BhjfQrM7wro6XHpYCjUYcyXzPrDHQ1fIzt6n/MQuTVrg hnOc12Gbo5J2C2qW+WrQ4zoG91qY4a3vmPXiKghEymWmRA3QPeiMlQoMZfEfnLgsD20Brv QVdTC++wBpKAkr86M36sehwX5oTah88ncnYPoL1Jyx/ga/zQL9d7mHlslPWyWpnB71g+HY uYVIm+FxnosXwFsAvNjwTn1e/RGXyhS3vg0upPtQiU8eII+IY0q5pXSq23N4kw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gxkC949mxz19TD for ; Fri, 10 Jul 2026 20:36:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 25111 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 10 Jul 2026 20:36:48 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 8a365723923e - main - kern_execve.c: simplify execve_block_wait() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8a365723923e4eadad962d9c7e8162dfbfe3e78c Auto-Submitted: auto-generated Date: Fri, 10 Jul 2026 20:36:48 +0000 Message-Id: <6a5157e0.25111.17c44039@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=8a365723923e4eadad962d9c7e8162dfbfe3e78c commit 8a365723923e4eadad962d9c7e8162dfbfe3e78c Author: Konstantin Belousov AuthorDate: 2026-07-10 10:05:13 +0000 Commit: Konstantin Belousov 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