From nobody Sat Sep 09 08:21:18 2023 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 4RjQt62yTvz4sKsV; Sat, 9 Sep 2023 08:21:18 +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 4RjQt62KRDz4Jbf; Sat, 9 Sep 2023 08:21:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694247678; 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=ZSp1/gx0KjIPAv+5F5WyzphGXgthtL/TRsDpz3FgWMQ=; b=dUoHFxrW9JZypRQ8h1XKKzZg1xMoXVnn3JevvXRTDk1LNR5fOXrWAFxmwS2G1muV3C9HwJ z1Hub9tDx34e+ZSANtnmBJ8ia2rxY0MMrsQkP1+9K8pxq5XmsBrVBr1SdqDA/VotHK4Ve7 Hus0iezCDT4F2vZYELpkRbldj5k5QJr7coAZ7xwH2njBfKX/wmsjPbz2CyKXuPzchNOcMq 0aOCyHrR4EFel5CPn6O5KBPdDlvRApWLrLZuxIMpHWPFzX6M6fZ/YTjdXrCgZ6jB2YA7aZ TZXXc7hKiXBWIC7sFKIYVSnjxAEk9cORxMwE+h7twVRBf3VIq8/kPPvnIUCGDw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1694247678; a=rsa-sha256; cv=none; b=PvAR1iT2bGMILW03Om2k5dRvauN7veDc2V+LSz7lfg2Oilo2ubINXsF53nNkTjMxZr1u9I XZgU1fb5UV3c6GWWhibbwT6s7C8ZuyPs1TOnF+TCjwYSSkbrjkqWx/FVTRQfuSCLhghKXB uZ+zmIiD8L1MpvdzOq6KOv+iqgJNqPUB6CIr17fgxi+TLbOk2TwZ+a/f1SXtX2MIKXH6pa zJqW1PxzPCPYpi50qgtVS9raly/I7gdiEu8hXsbsQGJSj19grF9Sfhq15med6w/VleCd8x OeNc2FAlAPVcWDjJzwfqzvGPjWxOAXlQz1cfdLPXEH1LQxnNzJaKiCdPjFyIMA== 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=1694247678; 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=ZSp1/gx0KjIPAv+5F5WyzphGXgthtL/TRsDpz3FgWMQ=; b=B12P+CeMe2OCVrFO/MRshnUHwt9yqLwb4bp8cNAjhRPy5B1fWht8DK4dJCiDbAzKMjs8XB cy5xng1zVRtR4pWEApWarsQjPHPnkkhmiqIFQ1so8MLfe2wS5wJPf4upCMlIoaT34OaweE tZTr/x/irx92ewDffxQSscRrNKey8nVzpHPjJV+hx7162DFYuxWsx1CHHaG3ZptYSFtRI+ RtXZ6yrJVXcyTi9URFVqhHdZlK5ztv1XIYtw8reaqGrXZrFmRB9YWx3zOtNcKuVsyNmPeF a9yfQDFOIy+lthQmTAy7M8pv7deWphHF7sglNzfn6bCiNIaiGe73LO26j/KbPQ== 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 4RjQt61LjQz30N; Sat, 9 Sep 2023 08:21:18 +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 3898LIY2046828; Sat, 9 Sep 2023 08:21:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3898LI8d046825; Sat, 9 Sep 2023 08:21:18 GMT (envelope-from git) Date: Sat, 9 Sep 2023 08:21:18 GMT Message-Id: <202309090821.3898LI8d046825@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 242fa308f3c3 - main - carp: Explicitly mark tunnable net.inet.carp.allow with CTLFLAG_NOFETCH 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: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 242fa308f3c3def32b2e61e0b78c11b3697e4492 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=242fa308f3c3def32b2e61e0b78c11b3697e4492 commit 242fa308f3c3def32b2e61e0b78c11b3697e4492 Author: Zhenlei Huang AuthorDate: 2023-09-09 08:10:32 +0000 Commit: Zhenlei Huang CommitDate: 2023-09-09 08:10:32 +0000 carp: Explicitly mark tunnable net.inet.carp.allow with CTLFLAG_NOFETCH With recent change 110113bc086f, a vnet tunable can be initialized when there is a corresponding kernel environment variable unless it is marked with the flag CTLFLAG_NOFETCH. The initialization may happen during early boot(linker preload), at that time vnet0 has not been created. The hander carp_allow_sysctl() for the tunable net.inet.carp.allow requires vnet, thus invoking it during early boot will cause kernel panic. The tunnable is initialized by vnet sysinit routine ipcarp_sysinit() so let's just mark it with flag CTLFLAG_NOFETCH. No functional change intended. Fixes: 110113bc086f sysctl(9): Enable vnet sysctl variables to be loader tunable MFC after: 2 week Differential Revision: https://reviews.freebsd.org/D41525 --- sys/netinet/ip_carp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c index 28c1e535b783..e8ed6afd3853 100644 --- a/sys/netinet/ip_carp.c +++ b/sys/netinet/ip_carp.c @@ -239,7 +239,7 @@ static int carp_demote_adj_sysctl(SYSCTL_HANDLER_ARGS); SYSCTL_NODE(_net_inet, IPPROTO_CARP, carp, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "CARP"); SYSCTL_PROC(_net_inet_carp, OID_AUTO, allow, - CTLFLAG_VNET | CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, + CTLFLAG_VNET | CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NOFETCH | CTLFLAG_MPSAFE, &VNET_NAME(carp_allow), 0, carp_allow_sysctl, "I", "Accept incoming CARP packets"); SYSCTL_PROC(_net_inet_carp, OID_AUTO, dscp,