HomeFreeBSD

Rework vlan(4) locking.

Description

Rework vlan(4) locking.

Previously the locking of vlan(4) interfaces was not very comprehensive.
Particularly there was very little protection against the destruction of
active vlan(4) interfaces or concurrent modification of a vlan(4)
interface. The former readily produced several different panics.

The changes can be summarized as using two global vlan locks (an
rmlock(9) and an sx(9)) to protect accesses to the if_vlantrunk field of
struct ifnet, in addition to other places where global exclusive access
is required. vlan(4) should now be much more resilient to the destruction
of active interfaces and concurrent calls into the configuration path.

PR: 220980
Reviewed by: ae, markj, mav, rstone
Approved by: rstone (mentor)
MFC after: 4 weeks
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D11370

Details

Provenance
mjorasAuthored on
Reviewer
ae
Differential Revision
D11370: Rework vlan(4) locking.
Parents
rS322547: Add vm_page_alloc_after().
Branches
Unknown
Tags
Unknown