From nobody Fri Nov 20 18:32:44 2026 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 4jWP8Y0V4Zz72QFC for ; Fri, 20 Nov 2026 18:32:45 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jWP8X6qy4z3Gy1 for ; Fri, 20 Nov 2026 18:32:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795199565; 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=Ujv8+XUiHCxezzdnVgEYCUD8Ocda8fNFDwm+mOHs8iE=; b=sON77rmdhGY5NBbsV/0fKlFUo4eKCEghkTuWgAg4Uq+FqNO4VaacBUPh6wbBMyZ1po8eQc mHjITUG8c4f6FnnQQX4lDRDMoTF0HeFqbbvFPPAae+xACcxjOp9+3L051FhgAaVSVWQnE5 OTYqbifUQ1y69+P2OcbnRIKYhM0MI8GesqsHj+VMBOl1xbhKlM83Y8+9Gjsu5oOecxQmY6 B1tvMBhK/LRwivoiR1Ch3OF8p0LH7D2WA37In8bSLuUrpW3tNTv4GT0OtwFO5oEz4As1dy UQeeqvRGsosbkrsGoPSEK6voWC8sxwQapE1Bj8TjQyqMG2CsesO0ZfQME0jl3Q== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795199565; b=qxBdoZWd8az0RnQW6yeveWA4ub+ODuv6x1UGcfcdhQwXJaJ2MAAQwg56VkclKd7jJtQYrD aoo3WEuBLbzjf9UENOYToKz08zKvDPuV1ZU/P29ouUI4rWRZvS9wOb4SvhAhiUGkzLUJRe hckVpQlzRnr41kWJUawIhZV4I/8g9Sm+0SWQ8m6YCyh4efLicr8XhpJ+C3zr9L9QlwAMWW Kd1pO7iFt2oJ+vbJO27C5nFVI/5b0njP9A1V+Qsapa2JkAfqrgkdXIc7C91msYS1sjb3JK Ddp8Fwye9e2XjVkTulPNcsSFpuvkbVtzI59i8RM+4wscVy04EabGDRZu83BOeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795199565; 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=Ujv8+XUiHCxezzdnVgEYCUD8Ocda8fNFDwm+mOHs8iE=; b=DW9EHY0HsFxutIPNZELUNjS13WfYUqnmt3Js99Q3xZSKYje3Kp/ygNWURNT8HOU+M6VwHs UZUmz52PEdLg1UQJ/piZ7TNfnrPoisWG1vgNQTsJKwKjffKSAbsq6VlwQ3R5e7Dc34RPBO 5uLGizfZSfPi10xE5oP2dwC67KNBVCJrCaVUMsGP2WSqBuTddMd/bLzLuW6iFum60g0hLK mokS8Fp23N5zBSZkt/4DZlEnYRFFPEhNn9dwhrRiXKhiwLSXuzH659tlgoCO+FtUHBqnWg 68Husf0bpMmxETcYMVre1I69avos+02QcA1bP0SpbKsstW/viX0XTLFEMGxuMg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jWP8X6W3Xz10xW for ; Fri, 20 Nov 2026 18:32:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 5a66 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 20 Nov 2026 18:32:44 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: R. Christian McDonald Subject: git: 2cb4abfe7e6b - main - linux: Destroy the per-VNET unit allocator after the cloners List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org List-Id: Commit messages for all branches of the src repository 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: rcm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2cb4abfe7e6b526897bbe602b121f07ed422ec08 Auto-Submitted: auto-generated Date: Fri, 20 Nov 2026 18:32:44 +0000 Message-Id: <6b00924c.5a66.3f161e47@gitrepo.freebsd.org> The branch main has been updated by rcm: URL: https://cgit.FreeBSD.org/src/commit/?id=2cb4abfe7e6b526897bbe602b121f07ed422ec08 commit 2cb4abfe7e6b526897bbe602b121f07ed422ec08 Author: R. Christian McDonald AuthorDate: 2026-11-20 18:31:15 +0000 Commit: R. Christian McDonald CommitDate: 2026-11-20 18:32:11 +0000 linux: Destroy the per-VNET unit allocator after the cloners linux_ifnet_vnet_uninit() deletes the unit number allocator that linux_ifnet_departure() frees into. It ran at SI_SUB_INIT_IF, SI_ORDER_ANY, the same slot in which lagg, vlan, edsc and ng_eiface destroy the interfaces left in a dying vnet. Destructors of equal order run in the reverse of the order their modules were loaded, so with linux_common loaded after if_lagg the allocator was gone by the time vnet_lagg_uninit() detached its interfaces, and removing a vnet jail that still held a lagg interface panicked in free_unr(). Commit a23901a37be9 moved the destructor from SI_SUB_PROTO_IF to SI_SUB_INIT_IF for the cloners that tear down earlier, which left this tie. Run the destructor at SI_ORDER_FIRST, which is after every destructor of a later order in the same subsystem, whatever the load order. Move the constructor with it. PR: 300934 Reported by: siva Reviewed by: markj, glebius Fixes: 607f11055d2d ("linux: store Linux Ethernet...") Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D61781 --- sys/compat/linux/linux_if.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/compat/linux/linux_if.c b/sys/compat/linux/linux_if.c index f386d55a9ae2..cc88f2c33605 100644 --- a/sys/compat/linux/linux_if.c +++ b/sys/compat/linux/linux_if.c @@ -113,9 +113,13 @@ linux_ifnet_vnet_init(void *arg __unused) linux_ifnet_arrival(NULL, ifp); NET_EPOCH_EXIT(et); } -VNET_SYSINIT(linux_ifnet_vnet_init, SI_SUB_INIT_IF, SI_ORDER_ANY, +VNET_SYSINIT(linux_ifnet_vnet_init, SI_SUB_INIT_IF, SI_ORDER_FIRST, linux_ifnet_vnet_init, NULL); +/* + * Runs at SI_ORDER_FIRST, after the cloners that destroy their interfaces + * at SI_SUB_INIT_IF: linux_ifnet_departure() needs the allocator until then. + */ static void linux_ifnet_vnet_uninit(void *arg __unused) { @@ -129,7 +133,7 @@ linux_ifnet_vnet_uninit(void *arg __unused) clear_unrhdr(V_linux_eth_unr); delete_unrhdr(V_linux_eth_unr); } -VNET_SYSUNINIT(linux_ifnet_vnet_uninit, SI_SUB_INIT_IF, SI_ORDER_ANY, +VNET_SYSUNINIT(linux_ifnet_vnet_uninit, SI_SUB_INIT_IF, SI_ORDER_FIRST, linux_ifnet_vnet_uninit, NULL); /*