From nobody Fri Jan 24 15:42:40 2025 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 4YfhsF2Xdsz5lZ7n; Fri, 24 Jan 2025 15:42:41 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YfhsF0Tv6z459g; Fri, 24 Jan 2025 15:42:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737733361; 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=9cpNFKzhWTRN+jAWocdp+n1RzmZcS+GOXXBd976XIFw=; b=v/g3SXW+yxxqT/sTotybEDVXxUHH0UobIHdJoffqchcQpE4wdA0KroQ70hTaGJkOFawbu3 gru1SI8d62xQTtLMENV8GSZRlX7+GGF54bC+yEt/RkVUSxwBpdgD0gtmKyz7kvDWJnhWAe KjiZcAAFVNE/dmS9deh1efkaLvS26jqSZFJiKUhRUCw5xjvQnrKJwsrnPzDc9Pmj92pWqG 4w4dMfebcgUyzCtdNEc/4jqeXO1d7dnIofPMFfpFEPJkCdi5s2tM1hmkgoS3E+gtDGJ6Qs llEi5Gi7xpHZ/XpYXbTaqDCH/6nVbcwodgYGBLGjjdzi+saRQkbNjAuCv7xwxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1737733361; 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=9cpNFKzhWTRN+jAWocdp+n1RzmZcS+GOXXBd976XIFw=; b=e4l0TAdHc6N2V4kT81ap6DJLJDXWXmxgk13JDcGT8CYAGGYoFiitIKEPIir7E68H2+k8+t wMsdKgG9Y+oeg1aBjVCnVFtXvp7+5PH/Ezyxe5xl9r2FPKqKa4admVyZrXRzK6FWGCBDab Yy3dB51KvRo1Gj+P2vRwN34my71Gz06Nh/qMI8DFyTK1Mhv9SNPZava1qH4r7U8K8iZDzo yTFokKWjoZcPjyi2tPwaWtklHbrNZUMf++2Dp3wG6vDPFjU6mFAuNU9DPuVA5o12rDPxh0 98J2tZ69SE5WFkJ/Cqx2zAjkw6g4D6F0cZSD7jUKQBtf2bFpZ8fUfWMSFG4dRQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1737733361; a=rsa-sha256; cv=none; b=S+Rh10B3GSdMgFHrZOSlbmraRuS2wUIo+/I45xGivp49VRTz/k2g0p4EDHEK8jrxG/UIxa lOcnm1fGD32bAeu2wxUxK7dhq7pX7j8Kx+BDE4uG3b5xTsLPGSWjS/O7vnwO/z9WZuC1AZ VBLF0NWE9Uy6PmDzO9FFsO08jxORC5HjGJ+XK6vZ4zOh3tD9yhi4IkQaVblwId7nfP9ipd pWrUfh4M31HfYZmWG9kxmVqbt22VfQTGFiUetbMC1qAP8kCzI/DDGiscgA9QgLYtIBQG3k xbWXxGdMFMTyihottIlQpKkt5cjhYXMtukIM+3R6ILcVqUC0OrK9xm+X+5iSgg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4YfhsD6r99zXSP; Fri, 24 Jan 2025 15:42:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 50OFgeAQ037260; Fri, 24 Jan 2025 15:42:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50OFgeSd037257; Fri, 24 Jan 2025 15:42:40 GMT (envelope-from git) Date: Fri, 24 Jan 2025 15:42:40 GMT Message-Id: <202501241542.50OFgeSd037257@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: d67b1748ea34 - stable/14 - carp: Explicitly mark tunnable net.inet.carp.allow with CTLFLAG_NOFETCH 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 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/stable/14 X-Git-Reftype: branch X-Git-Commit: d67b1748ea34ad6f66072694fd8b623ab0ea72b1 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=d67b1748ea34ad6f66072694fd8b623ab0ea72b1 commit d67b1748ea34ad6f66072694fd8b623ab0ea72b1 Author: Zhenlei Huang AuthorDate: 2023-09-09 08:10:32 +0000 Commit: Zhenlei Huang CommitDate: 2025-01-24 15:41:09 +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 (cherry picked from commit 242fa308f3c3def32b2e61e0b78c11b3697e4492) --- 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 335cb42613bf..ddbc13e7c878 100644 --- a/sys/netinet/ip_carp.c +++ b/sys/netinet/ip_carp.c @@ -237,7 +237,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,