Page MenuHomeFreeBSD

if_gif: fix vnet shutdown panic
ClosedPublic

Authored by kp on Nov 4 2021, 5:17 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, May 21, 11:41 AM
Unknown Object (File)
Tue, May 12, 11:58 PM
Unknown Object (File)
Tue, May 12, 11:58 PM
Unknown Object (File)
Tue, May 12, 11:53 PM
Unknown Object (File)
Wed, May 6, 7:39 AM
Unknown Object (File)
Wed, May 6, 12:33 AM
Unknown Object (File)
Tue, May 5, 10:59 PM
Unknown Object (File)
Sun, May 3, 1:22 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
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable