HomeFreeBSD

if_bridge(4): Fix module teardown

Description

if_bridge(4): Fix module teardown

bridge_rtnode_zone still has outstanding allocations at the time of
destruction in the current model because all of the interface teardown
happens in a VNET_SYSUNINIT, -after- the MOD_UNLOAD has already been
processed. The SYSUNINIT triggers destruction of the interfaces, which then
attempts to free the memory from the zone that's already been destroyed, and
we hit a panic.

Solve this by virtualizing the uma_zone we allocate the rtnodes from to fix
the ordering. bridge_rtable_fini should also take care to flush any
remaining routes that weren't taken care of when dynamic routes were flushed
in bridge_stop.

Reviewed by: kp
Differential Revision: https://reviews.freebsd.org/D19578

Details

Provenance
kevansAuthored on
Differential Revision
D19578: if_bridge(4): Fix module teardown
Parents
rS345179: Remove unneeded mount point unlock function calls.
Branches
Unknown
Tags
Unknown