From nobody Tue Aug 30 02:24:53 2022 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 4MGrjx73h8z4bJ85; Tue, 30 Aug 2022 02:24:53 +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 4MGrjx61BHz42w3; Tue, 30 Aug 2022 02:24:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661826293; 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=j+UML38U0NuT+bCRwFQ4Fyj6xFW/oU60F0VZps0Dyi4=; b=W3374XAhEtX9zX9uWHhmzHwdD7hmwhnw3edyeG7YQwq5G/wBtJQ2rmIaQodsV4VsfR9EfT /B3iqvQQSMSTQj75o38V10ohO8MZXrf4k6whXGnPh3rQhKZIw8nqyoB3k+oQ0VCj7Zrm1C ZwABCjUVjBFxgWlOZotoVQRsZOjjWG7TYBeLGJ0ma8ywUZ11iWmB4wzC514eMydlaaplgb 8O2qJld1dcem3Gd/aTAaTRv/NACNzRilUnvX5YWmtT7LJbts95RkGaGVvfey8lc1HB2fvD Cl+UV9Ppuq4ilFXOTGXG8v+/zL5uQNMjVg9Sm0XUrh7xLdRcPGoUs8idgd77UQ== 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 4MGrjx4nt5zdcL; Tue, 30 Aug 2022 02:24:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 27U2Orat008077; Tue, 30 Aug 2022 02:24:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27U2Orht008076; Tue, 30 Aug 2022 02:24:53 GMT (envelope-from git) Date: Tue, 30 Aug 2022 02:24:53 GMT Message-Id: <202208300224.27U2Orht008076@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: d7574c74326a - main - domains: init pr_domain in pr_init() 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d7574c74326aebc9eaaf20ced7c7a53c6db5f685 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661826293; 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=j+UML38U0NuT+bCRwFQ4Fyj6xFW/oU60F0VZps0Dyi4=; b=UiE0wYOOoICMHC1NWTDjDxRJYqLc9BW6c5LFsFLQ+B+a8i++op71ZSed2cmwfX1cYRo3OV aOZBfwIZkepuHHvNcQ1NIhC5ucmWoZDu9fU4Ij+Q86yRNcsl+IZBMHqrhDhEDE/gbFuEIy 9+PlBCgNF4+7E6/OcZm41Yx9wyXXyMR/Rl0LBeF0ka+KpHGbItIwAbuMrZpYd1gRi4duYm VdhgaCMyPUaI8s0KYMOskWWw8lZ1uWYNI6hbfbPdYp0LBK0kVxavCUeiZTe8owD5bohTTS UftKPiImz00uAuHBBwCPkJdybhPeCbIGVwk4HdZWh5W7O2EkzgpbLtUt0DcQCw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1661826293; a=rsa-sha256; cv=none; b=CJ4PmoMvTWySWIhXeGusB7jRdcjPAong2D3w2A501W/UX/9he1EQrRluaSrnAylu3QAFRB ZwzGBTQFi9efQjJc0Z/9uIBegnakc0vQcajwXYex0kMgwYUcpioiw3wRUDmtrcmG37Pkqx sZp0dTxwbpjfcPtp37JaXeDcKlLCpfNP1M3yReF5IYC+vU1PL4laArohQXlpKoOXhsUVJG BLeYw8deiKonP7KObzToy//JuD1WIBoRJkRYiKxOIkex0g5uPgaW5rDxUehsUQYhVolmtU WWqTbtWfmHKuJ96gkXytW35xltK4lQTvFwnpqNKO+GYgA5zpn+EzDQbg2WkwWQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=d7574c74326aebc9eaaf20ced7c7a53c6db5f685 commit d7574c74326aebc9eaaf20ced7c7a53c6db5f685 Author: Gleb Smirnoff AuthorDate: 2022-08-30 02:15:01 +0000 Commit: Gleb Smirnoff CommitDate: 2022-08-30 02:15:01 +0000 domains: init pr_domain in pr_init() --- sys/kern/uipc_domain.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/sys/kern/uipc_domain.c b/sys/kern/uipc_domain.c index 3c0a570842b0..334a7a036daa 100644 --- a/sys/kern/uipc_domain.c +++ b/sys/kern/uipc_domain.c @@ -208,12 +208,14 @@ pr_sopoll_notsupp(struct socket *so, int events, struct ucred *cred, } static void -pr_init(struct protosw *pr) +pr_init(struct domain *dom, struct protosw *pr) { KASSERT(pr->pr_attach != NULL, ("%s: protocol doesn't have pr_attach", __func__)); + pr->pr_domain = dom; + #define DEFAULT(foo, bar) if (pr->foo == NULL) pr->foo = bar DEFAULT(pr_sosend, sosend_generic); DEFAULT(pr_soreceive, soreceive_generic); @@ -261,10 +263,8 @@ domain_init(struct domain *dp) MPASS((flags & DOMF_INITED) == 0); for (int i = 0; i < dp->dom_nprotosw; i++) - if ((pr = dp->dom_protosw[i]) != NULL) { - pr->pr_domain = dp; - pr_init(pr); - } + if ((pr = dp->dom_protosw[i]) != NULL) + pr_init(dp, pr); atomic_set_rel_int(&dp->dom_flags, DOMF_INITED); } @@ -439,8 +439,7 @@ protosw_register(struct domain *dp, struct protosw *npr) return (ENOMEM); } - npr->pr_domain = dp; - pr_init(npr); + pr_init(dp, npr); *prp = npr; mtx_unlock(&dom_mtx);