Page MenuHomeFreeBSD

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

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


Group Reviewers

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 OK
No Unit Test Coverage
Build Status
Buildable 25224
Build 23899: arc lint + arc unit

Event Timeline

kp created this revision.Jul 6 2019, 5:35 PM
kp added reviewers: bz, mmacy.Jul 6 2019, 5:36 PM
lwhsu added a subscriber: lwhsu.Jul 8 2019, 9:06 PM
emaste added a subscriber: emaste.Dec 18 2019, 4:40 PM