On Wed, Nov 23, 2022 at 02:59:05PM -0500, David Hill wrote: > Hello - > > I am seeing splasserts on boot (before kern.splassert=2 can be set) with > -current. > > .... > > spdmem0 at iic0 addr 0x50: 8GB DDR3 SDRAM PC3-12800 SO-DIMM > isa0 at pcib0 > isadma0 at isa0 > vga0 at isa0 port 0x3b0/48 iomem 0xa0000/131072 > wsdisplay at vga0 not configured > pcppi0 at isa0 port 0x61 > spkr0 at pcppi0 > vmm0 at mainbus0: VMX/EPT (using slow L1TF mitigation) > splassert: pfi_attach_ifgroup: want 2 have 0 > splassert: pfi_group_addmember: want 2 have 0 > splassert: pfi_attach_ifgroup: want 2 have 0 > splassert: pfi_attach_ifgroup: want 2 have 0 > splassert: pfi_group_addmember: want 2 have 0 > > > - David >
The netlock assertion within PF_LOCK() looks wrong. The netlock should be taken first, but only if both locks taken. Index: sys/net/pfvar_priv.h =================================================================== RCS file: /cvs/src/sys/net/pfvar_priv.h,v retrieving revision 1.21 diff -u -p -r1.21 pfvar_priv.h --- sys/net/pfvar_priv.h 11 Nov 2022 17:12:30 -0000 1.21 +++ sys/net/pfvar_priv.h 23 Nov 2022 20:14:13 -0000 @@ -278,7 +278,6 @@ extern struct rwlock pf_lock; extern struct rwlock pf_state_lock; #define PF_LOCK() do { \ - NET_ASSERT_LOCKED(); \ rw_enter_write(&pf_lock); \ } while (0)