git: a23901a37be9 - main - linux: Initialize per-VNET state earlier
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 07 Oct 2026 13:28:43 UTC
The branch main has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=a23901a37be9d8567db42f20d2ccc40fc5b7ee2a
commit a23901a37be9d8567db42f20d2ccc40fc5b7ee2a
Author: Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2026-10-06 22:05:03 +0000
Commit: Mark Johnston <markj@FreeBSD.org>
CommitDate: 2026-10-07 13:28:28 +0000
linux: Initialize per-VNET state earlier
Make sure that linux_ifnet_departure() can't run after
linux_ifnet_vnet_uninit() has destroyed the per-VNET unit number
allocator. Otherwise, when ifc_detach_cloner() destroys instances of an
interface type, it might be running too late. Most cloner-based drivers
tear themselves down during SI_SUB_PSEUDO or SI_SUB_PROTO_IF.
Reviewed by: pouria, glebius
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D60389
---
sys/compat/linux/linux_if.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sys/compat/linux/linux_if.c b/sys/compat/linux/linux_if.c
index 51a76aa13be3..f386d55a9ae2 100644
--- a/sys/compat/linux/linux_if.c
+++ b/sys/compat/linux/linux_if.c
@@ -113,7 +113,7 @@ linux_ifnet_vnet_init(void *arg __unused)
linux_ifnet_arrival(NULL, ifp);
NET_EPOCH_EXIT(et);
}
-VNET_SYSINIT(linux_ifnet_vnet_init, SI_SUB_PROTO_IF, SI_ORDER_ANY,
+VNET_SYSINIT(linux_ifnet_vnet_init, SI_SUB_INIT_IF, SI_ORDER_ANY,
linux_ifnet_vnet_init, NULL);
static void
@@ -129,7 +129,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_PROTO_IF, SI_ORDER_ANY,
+VNET_SYSUNINIT(linux_ifnet_vnet_uninit, SI_SUB_INIT_IF, SI_ORDER_ANY,
linux_ifnet_vnet_uninit, NULL);
/*