Page MenuHomeFreeBSD

frag6: fix vnet teardown leak
ClosedPublic

Authored by bz on Oct 16 2019, 9:55 AM.
Tags
None
Referenced Files
F154839208: D22054.id63509.diff
Wed, Apr 29, 2:02 PM
F154770867: D22054.id63347.diff
Wed, Apr 29, 10:10 AM
F154769072: D22054.id63347.diff
Wed, Apr 29, 10:05 AM
F154752107: D22054.id63509.diff
Wed, Apr 29, 9:16 AM
F154749041: D22054.id63509.diff
Wed, Apr 29, 9:09 AM
F154622098: D22054.id.diff
Wed, Apr 29, 1:51 AM
Unknown Object (File)
Tue, Apr 28, 7:38 AM
Unknown Object (File)
Tue, Apr 28, 12:40 AM
Subscribers

Details

Summary

When shutting down a VNET we did not cleanup the fragmentation hashes.
This has multiple problems: (1) leak memory but also (2) leak on the
global counters, which might eventually lead to a problem on a system
starting and stopping a lot of vnets and dealing with a lot of IPv6
fragments that the statistics would be exhausted (maybe memory would
be gone first).

Unfortunately we do not have a useable variable to indicate when
per-VNET initialization of frag6 has happened (or when destroy happened)
so introduce a boolean to flag this. This is needed here as well as
it was in r353635 for ip_reass.c in order to avoid tripping over the
already destroyed locks if interfaces go away after the frag6 destroy.

Reported by: hselasky
Reviewed by:

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 27064
Build 25349: arc lint + arc unit