HomeFreeBSD

ifnet: vnet_if_return(): Avoid unnecessary recursive acquisition of…

Description

ifnet: vnet_if_return(): Avoid unnecessary recursive acquisition of ifnet_detach_sxlock

vnet_if_return() will be invocked by vnet_sysuninit() on vnet destructing,
while the lock ifnet_detach_sxlock has been acquired in vnet_destroy()
already.

With this change the order of locking is more clear. There should be no
functional change.

Reviewed by: pouria
Fixes: 868bf82153e8 if: avoid interface destroy race
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D56288

(cherry picked from commit f1fae67afbb13a41d488d0e0ec66b1805925019c)
(cherry picked from commit ccfc2d91304e88aafc0ca0e13e0f8b5a156d2a01)