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

Details

Provenance
kpAuthored on Mar 27 2022, 6:23 PM
Differential Revision
D34704: if: avoid interface destroy race
Parents
rGb29fb6cffd02: Improve description of the nocache option.
Branches
Unknown
Tags
Unknown