From nobody Fri Jul 31 15:57:47 2026 X-Original-To: dev-commits-src-main@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 4hBW1S2G33z6n3gx for ; Fri, 31 Jul 2026 15:57:48 +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 4hBW1R6nkbz3s35 for ; Fri, 31 Jul 2026 15:57:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1785513468; 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=hdy/R3nsxj4I0jp52S4pLLE+8wAowAVtTcQ/S4cri+M=; b=g8SCRL3tB8Jq+TMfKgNiMzDvQ49/caD+DdPc9UT8mDPvtWA+UmGMrWvBQSYwX+76/gUUrM +twmKZ4aBYSXburMF6j8FP4ihygCfLbl+MtyEwzwE3aSRCqvEtgxl+/hNJjY7fJCNmIAJb XCsVXORlTZKScUJBZRB4L0ZTL0AbtxwIfekKLOLUcSkCbPq5wJRC82P+e9tAquSRYvJefO ozXNfXb9xX7YmSF1aTZLhn6SUvWPvWd807YvNX0nui+KWAN/zjb+1WhJt4vz6hFnDNQvU3 E6WOnz7rc51haMA3v6PnU98Wn7Md1kXWrqpv/no+fBkpBIvVHZr5+03mLDKlkQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1785513468; a=rsa-sha256; cv=none; b=coz//9bOqX4n4tZDLD80KtfZhaBll9yvnyg3HNXapG3QMNE8QrMcy8GDmmD2QQSnmSa4r8 7p1qqTx8JXAn6AfItqFaz0RVJLd4ib2gHF4kISZKRYZW/grAzv7AymRjJ24SzjrcgRV9FK C91jPKKmEf0vHf+tx0HQ3/YscjfSpqpsVQ/jLxiK+/2yh1I9zxo9hO/nTGgAHsP9HcVMzJ DD0YqwJNEqDge5wdcKn4eaGp0Iv2C0StNCZCuAmuN35/f26lBvRys3KT6jVgKB02aamjcb RqBrEgUlElQYQZiirq7YZ+jBCCIKZe7s96LzWzDiteKY2FrO1Mf9WsvXl6MYfw== 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=1785513468; 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=hdy/R3nsxj4I0jp52S4pLLE+8wAowAVtTcQ/S4cri+M=; b=u4nAdb59LBApl7ce2dpIPjz5oQ5zPsgahMlkjBKhDL9oBsH8S2iUXC+PPMGxdNTwQM1QLk ATH6Wh7EOl7Ns2FaOU3YvwUm5SFR3xNGgLmCFQqCqHsyWMlWTotny5ABtzdHVygmtwtNOS U5TCDyaWRetqPYz3faW/gZgGdIp0v5iLkRPTO1fDpWOpFFsBPOAf0SL8YXguzVKNS27cQf 36RMZo4cxmqoUvroSEq/1XzWxSpYZPXff8bTPhV1L0aBu6nM9/VnEHmnJcJkwcBlUVMG7n KDjqsrJhzedyKTGEojD2/85Wh5YoDH3C/nAGjPsSReNaJ7vqsHjeMSHO/QuU4w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hBW1R5lYcz15VN for ; Fri, 31 Jul 2026 15:57:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 322a9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 31 Jul 2026 15:57:47 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 833bdae6c58b - main - proc_realparent(): do not mark the child as orphan when reparenting to p_opptr pid List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: 833bdae6c58bcede4d9d5e64612b34295558de0b Auto-Submitted: auto-generated Date: Fri, 31 Jul 2026 15:57:47 +0000 Message-Id: <6a6cc5fb.322a9.6720d56a@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=833bdae6c58bcede4d9d5e64612b34295558de0b commit 833bdae6c58bcede4d9d5e64612b34295558de0b Author: Konstantin Belousov AuthorDate: 2026-07-31 02:04:05 +0000 Commit: Konstantin Belousov CommitDate: 2026-07-31 15:57:31 +0000 proc_realparent(): do not mark the child as orphan when reparenting to p_opptr pid Reported and reviewed by: markj Fixes: 8cef3c9b768a ("proc_realparent(): assert that an orphaned child has real parent != parent") Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D58566 --- sys/kern/kern_exit.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index ebe4aa40c128..7fb3f115af9d 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -1663,9 +1663,8 @@ proc_reparent(struct proc *child, struct proc *parent, bool set_oppid) LIST_INSERT_HEAD(&parent->p_children, child, p_sibling); proc_clear_orphan(child); - if ((child->p_flag & P_TRACED) != 0) { + if ((child->p_flag & P_TRACED) != 0 && child->p_oppid != parent->p_pid) proc_add_orphan(child, child->p_pptr); - } child->p_pptr = parent; if (set_oppid)