Page MenuHomeFreeBSD

if_gif: fix vnet shutdown panic
ClosedPublic

Authored by kp on Nov 4 2021, 5:17 PM.
Tags
None
Referenced Files
F102417316: D32835.diff
Tue, Nov 12, 12:03 AM
Unknown Object (File)
Sat, Oct 26, 8:15 AM
Unknown Object (File)
Oct 1 2024, 11:23 AM
Unknown Object (File)
Sep 24 2024, 12:23 AM
Unknown Object (File)
Sep 23 2024, 2:34 PM
Unknown Object (File)
Sep 14 2024, 6:18 AM
Unknown Object (File)
Sep 10 2024, 4:08 PM
Unknown Object (File)
Sep 7 2024, 4:41 PM

Details

Summary

If an if_gif exists and has an address assigned inside a vnet when the
vnet is shut down we failed to clean up the address, leading to a panic
when we ip_destroy() and the V_in_ifaddrhashtbl is not empty.

This happens because of the VNET_SYS(UN)INIT order, which means we
destroy the if_gif interface before the addresses can be purged (and
if_detach() does not remove addresses, it assumes this will be done by
the stack teardown code).

Set subsystem SI_SUB_PSEUDO just like if_bridge so the cleanup
operations happen in the correct order.

MFC after: 3 weeks
Sponsored by: Rubicon Communications, LLC ("Netgate")

Diff Detail

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