[Bug 258751] race between pfi_kkif_update() and if_addgroup()

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 29 Sep 2021 15:19:59 +0000
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=258751

Kristof Provost <kp_at_freebsd.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kp_at_freebsd.org

--- Comment #1 from Kristof Provost <kp_at_freebsd.org> ---
That looks like a plausible issue, yes.

Arguably we should be running the event handler under the IFNET_WLOCK to ensure
this sort of order reversal doesn't happen. I'm sure that'd have all sorts of
other problems though.

Initialising ifg_pf_kif to NULL and skipping such groups in pfi_kkif_update()
would at least avoid the panic, but I suspect it'd leave pf subtly out of sync
with the real interface state (and address assignments), which is going to
cause very subtle and impossible to debug problems of its own. We'd probably
avoid those if we called pfi_kkif_update() from pfi_kkif_attach(), but the last
time I touched if groups for pf it took a year for the fallout to settle.

-- 
You are receiving this mail because:
You are the assignee for the bug.
Received on Wed Sep 29 2021 - 15:19:59 UTC

Original text of this message