Page MenuHomeFreeBSD

vnet: Fix panic when shutting down jails and deleting interfaces simultaneously
Needs ReviewPublic

Authored by kristof on Jul 6 2019, 5:35 PM.

Details

Reviewers
bz
mmacy
Group Reviewers
network
Summary

When we shut down a vnet jail its interfaces get moved back into their
original vnet. If we simultaneously delete that interface there's a
possible race where the interface is being moves while it's being
destroyed. That can result in if_vmove() attaching the interface into
the original vnet, and immediately freed. We then have a freed ifp in
V_ifnet, which will panic the next time we end up accessing it.

Don't re-attach dying interfaces.

This is frequently triggered by the automated pf tests.

Diff Detail

Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 25224
Build 23899: arc lint + arc unit