[Bug 300934] sys/netipsec/tunnel/sa_flowid test kernel panics: general protection fault while in kernel mode

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 20 Nov 2026 18:33:40 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=300934

--- Comment #2 from commit-hook@FreeBSD.org ---
A commit in branch main references this bug:

URL:
https://cgit.FreeBSD.org/src/commit/?id=2cb4abfe7e6b526897bbe602b121f07ed422ec08

commit 2cb4abfe7e6b526897bbe602b121f07ed422ec08
Author:     R. Christian McDonald <rcm@FreeBSD.org>
AuthorDate: 2026-11-20 18:31:15 +0000
Commit:     R. Christian McDonald <rcm@FreeBSD.org>
CommitDate: 2026-11-20 18:32:11 +0000

    linux: Destroy the per-VNET unit allocator after the cloners

    linux_ifnet_vnet_uninit() deletes the unit number allocator that
    linux_ifnet_departure() frees into.  It ran at SI_SUB_INIT_IF,
    SI_ORDER_ANY, the same slot in which lagg, vlan, edsc and ng_eiface
    destroy the interfaces left in a dying vnet.  Destructors of equal order
    run in the reverse of the order their modules were loaded, so with
    linux_common loaded after if_lagg the allocator was gone by the time
    vnet_lagg_uninit() detached its interfaces, and removing a vnet jail that
    still held a lagg interface panicked in free_unr().

    Commit a23901a37be9 moved the destructor from SI_SUB_PROTO_IF to
    SI_SUB_INIT_IF for the cloners that tear down earlier, which left this
    tie.

    Run the destructor at SI_ORDER_FIRST, which is after every destructor of
    a later order in the same subsystem, whatever the load order.  Move the
    constructor with it.

    PR:                     300934
    Reported by:            siva
    Reviewed by:            markj, glebius
    Fixes:                  607f11055d2d ("linux: store Linux Ethernet...")
    Sponsored by:           Rubicon Communications, LLC ("Netgate")
    Differential Revision:  https://reviews.freebsd.org/D61781

 sys/compat/linux/linux_if.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

-- 
You are receiving this mail because:
You are on the CC list for the bug.