Page MenuHomeFreeBSD

frag6: fix vnet teardown leak
ClosedPublic

Authored by bz on Oct 16 2019, 9:55 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Mar 22, 2:26 PM
Unknown Object (File)
Sun, Mar 22, 12:48 AM
Unknown Object (File)
Fri, Mar 20, 6:40 AM
Unknown Object (File)
Fri, Mar 20, 12:09 AM
Unknown Object (File)
Sat, Mar 14, 3:05 PM
Unknown Object (File)
Mon, Mar 9, 10:48 AM
Unknown Object (File)
Feb 24 2026, 4:32 AM
Unknown Object (File)
Feb 24 2026, 4:31 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
Lint Not Applicable
Unit
Tests Not Applicable