Date: Thu, 15 Jan 2026 21:41:05 +0000 From: Gleb Smirnoff <glebius@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: f9ae08a88924 - main - linux: on vnet detach call clean_unrhdr(9) always Message-ID: <69695ef1.22cfd.264cac11@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=f9ae08a88924ba861ad0bb76f5a9a11fb44eced8 commit f9ae08a88924ba861ad0bb76f5a9a11fb44eced8 Author: Gleb Smirnoff <glebius@FreeBSD.org> AuthorDate: 2026-01-15 21:37:34 +0000 Commit: Gleb Smirnoff <glebius@FreeBSD.org> CommitDate: 2026-01-15 21:37:34 +0000 linux: on vnet detach call clean_unrhdr(9) always The assumption was incorrect, and the current VIMAGE implementation leaves a possibility for some interfaces still exist in a jail that is going away. Fixes: 607f11055d2d421770963162a4d9a99cdd136152 --- sys/compat/linux/linux_if.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/sys/compat/linux/linux_if.c b/sys/compat/linux/linux_if.c index f201f7c4b128..ca4e3a4079ed 100644 --- a/sys/compat/linux/linux_if.c +++ b/sys/compat/linux/linux_if.c @@ -105,12 +105,13 @@ static void linux_ifnet_vnet_uninit(void *arg __unused) { /* - * At a normal vnet shutdown all interfaces are gone at this point. - * But when we kldunload linux.ko, the vnet_deregister_sysuninit() - * would call this function for the default vnet. + * All cloned interfaces are already gone at this point, as well + * as interfaces that were if_vmove'd into this vnet. However, + * if a jail has created IFT_ETHER interfaces in self, or has had + * physical Ethernet drivers attached in self, than we may have + * allocated entries in the unr(9), so clear it to avoid KASSERT. */ - if (IS_DEFAULT_VNET(curvnet)) - clear_unrhdr(V_linux_eth_unr); + 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,home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69695ef1.22cfd.264cac11>
