| #
89eddfb4 |
| 10-Dec-2025 |
Gleb Smirnoff <glebius@FreeBSD.org> |
linux: fix panic on kldunload
The vnet_deregister_sysuninit() that is called by linker unload sequence also calls every registered destructor before unregistering it. IMHO, this is not correct in p
linux: fix panic on kldunload
The vnet_deregister_sysuninit() that is called by linker unload sequence also calls every registered destructor before unregistering it. IMHO, this is not correct in principle, but for now plug the regression right in the code that introduced the panic.
Fixes: 607f11055d2d421770963162a4d9a99cdd136152
show more ...
|
| #
607f1105 |
| 08-Dec-2025 |
Gleb Smirnoff <glebius@FreeBSD.org> |
linux: store Linux Ethernet interface number in struct ifnet
The old approach where we go through the list of interfaces and count them has bugs. One obvious bug with this dynamic translation is th
linux: store Linux Ethernet interface number in struct ifnet
The old approach where we go through the list of interfaces and count them has bugs. One obvious bug with this dynamic translation is that once an Ethernet interface in the middle of the list goes away, all interfaces following it would change their Linux names.
A bigger problem is the ifnet arrival and departure times. For example linsysfs has event handler for ifnet_arrival_event, and of course it wants to resolve the name. This accidentially works, due to a bug in if_attach() where we call if_link_ifnet() before invoking all the event handlers. Once the bug is fixed linsysfs won't be able to resolve the old way. The other side is ifnet_departure_event, where there is no bug, the eventhandlers are called after the if_unlink_ifnet(). This means old translation won't work for departure event handlers. One example is netlink. This change gives the Netlink a chance to emit a proper Linux interface departure message.
However, there is another problem in Netlink, that the ifnet pointer is lost in the Netlink translation layer. Plug this with a cookie in netlink writer structure that can be set by the route layer and used by the Netlink Linux translation layer. This part of the diff seems unrelated, but it is hard to make it a separate change, as the old KPI goes away and to use the new one we need the pointer.
Differential Revision: https://reviews.freebsd.org/D54077
show more ...
|
| #
fbf05d21 |
| 08-Dec-2025 |
Gleb Smirnoff <glebius@FreeBSD.org> |
linux: separate all ifnet(9) related code into linux_ifnet.c
Remove linux_use_real_ifname(). It is no longer used outside of the file since 3ab3c9c29cf0. There is no functional change.
Reviewed b
linux: separate all ifnet(9) related code into linux_ifnet.c
Remove linux_use_real_ifname(). It is no longer used outside of the file since 3ab3c9c29cf0. There is no functional change.
Reviewed by: melifaro, dchagin Differential Revision: https://reviews.freebsd.org/D54076
show more ...
|