From nobody Tue Nov 28 17:30:09 2023 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 4SfqGT2Lndz52GfQ; Tue, 28 Nov 2023 17:30:09 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SfqGT1qmFz4DWb; Tue, 28 Nov 2023 17:30:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701192609; 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=PKkOOp+Foe4lXcW1rSO4Hlx0BSly7F/2t0CH9+2s7UE=; b=PdQ35seyI7Mfcl36rXFfz0siYE6HQBRDTdze9Ppij4m0uUZOlBvPyVWKXJsPQrZtFRghwb mr1QiEAp0PYdURlvpqHpLTdVe1Q0B+KVm14OpLxIdwmGRuFlgdeu+IynQF1sqkv9/t6Dxk 0BWyV0x740QaUOlvWbV3tA6FNNNouJe2sJUF5MZ6VQEZe3VcFsUeFsa7z6igp0c+Mg3GNh 27BdnDLh3PIeELOCKuKsWdT75X3URdEXmBkK7wTgtxXEgy2MMdlqD/A4HQAlJkYxJQu7qV 6j3FLXuWyZci/jwXqhorgdPfLZJILj3y0nU9c+zSye/ZdJknXDuk+UWRlPavBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701192609; 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=PKkOOp+Foe4lXcW1rSO4Hlx0BSly7F/2t0CH9+2s7UE=; b=ATzbzi/DFf5HkFqmTYR05ZYAyVNn6SOBrmqTkrRoZa9ppMkvR21fToWOutlCSWsBDkG1f0 ngExpYUhg4GgURepOPhBE6npa398ab9JEJDFkH6/bRVuv80KiXQCW+LlgUKrgX9+GEl56A 7vk3YWJrJFg73Ev3a6iaBBIffPuZNR2yQzZ/apU4mW6uc98Qa04yoe4+pLaOmu306Xl1u1 QtmskIYn6TtPfk57ZFgtGu8aLFzdIXP2crVolNY/KFixFLzirm0UGGPJv3k0BRHi1VYAI2 rgTu5+x5R/VvK2ykoOISC7uWtv57GaxPnm2NbyMZVmx6KHLqllFfck0Re1smVw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1701192609; a=rsa-sha256; cv=none; b=SKbp0IFk9Y5jbmIeV1Wlu6/P+jTUZ1M4S8I1ngGrQ6UE3WBXOxN+gOWJliLFvDaYO7elL6 jalrIIxhLoW8aoJ0vh8nlYTijH8+mkGbhlNK8kcZivq5xAe/CoICM+PlRe/5qMlytW3juk 5I8c0549khQpT010P7cpPUReVlp/5DpYI94hYlXQIhFDpeEtM9PMwBiLQMCf3dS6u2fEoN cnvfVnGU2h5zo9xy3IfU+L3xtF7gu0GGnMC+ZV3MSiQIZylf185F4Qk5F9KPTxKfLdwlRL ERAEwfYVyx7QjWAadvh6NTvhxoORERB4jLKW1VmmM9EDfoaZ9NZGmcWeQoipdw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SfqGT0xDwzWt4; Tue, 28 Nov 2023 17:30:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3ASHU97v016141; Tue, 28 Nov 2023 17:30:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3ASHU9GL016133; Tue, 28 Nov 2023 17:30:09 GMT (envelope-from git) Date: Tue, 28 Nov 2023 17:30:09 GMT Message-Id: <202311281730.3ASHU9GL016133@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 171f0832c5b1 - main - EVFILT_TIMER: intialize stop timer list in type-stable proc init, instead of fork 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org 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: 171f0832c5b15f2f66d2fe59967348a42814b0c1 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=171f0832c5b15f2f66d2fe59967348a42814b0c1 commit 171f0832c5b15f2f66d2fe59967348a42814b0c1 Author: Konstantin Belousov AuthorDate: 2023-11-28 15:42:49 +0000 Commit: Konstantin Belousov CommitDate: 2023-11-28 17:29:58 +0000 EVFILT_TIMER: intialize stop timer list in type-stable proc init, instead of fork Since kqueue timer may exist after the process that created it exited (same scenario with rfork(2) as in PR 275286), make the tailq p_kqtim_stop accessed by filt_timerdetach() type-stable. Noted and reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D42777 --- sys/kern/kern_fork.c | 1 - sys/kern/kern_proc.c | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index 7b9aa4cd61d1..c7b2b1195841 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -622,7 +622,6 @@ do_fork(struct thread *td, struct fork_req *fr, struct proc *p2, struct thread * LIST_INIT(&p2->p_orphans); callout_init_mtx(&p2->p_itcallout, &p2->p_mtx, 0); - TAILQ_INIT(&p2->p_kqtim_stop); /* * This begins the section where we must prevent the parent diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index 2c115202636e..8a396e208ff6 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -275,6 +275,7 @@ proc_init(void *mem, int size, int flags) EVENTHANDLER_DIRECT_INVOKE(process_init, p); p->p_stats = pstats_alloc(); p->p_pgrp = NULL; + TAILQ_INIT(&p->p_kqtim_stop); return (0); }