HomeFreeBSD

if: avoid interface destroy race

Description

if: avoid interface destroy race

When we destroy an interface while the jail containing it is being
destroyed we risk seeing a race between if_vmove() and the destruction
code, which results in us trying to move a destroyed interface.

Protect against this by using the ifnet_detach_sxlock to also covert
if_vmove() (and not just detach).

PR: 262829
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D34704

(cherry picked from commit 868bf82153e8ff22f09a8860c872149e0fb6bdef)

Details

Provenance
kpAuthored on Mar 27 2022, 6:23 PM
Differential Revision
D34704: if: avoid interface destroy race
Parents
rG8fab6c484931: dumpon: warn if the configured netdump link is down
Branches
Unknown
Tags
Unknown