Hello,

On 24/03/19(Sun) 01:00, Hrvoje Popovski wrote:
> Hi all,
> 
> while playing around with stp and pair interfaces and using exactly the
> same example as in man (4) pair
> 
> ifconfig pair0 up
> ifconfig pair1 rdomain 1 patch pair0 up
> ifconfig pair2 up
> ifconfig pair3 rdomain 1 patch pair2 up
> ifconfig bridge0 add pair0 add pair2 stp pair0 stp pair2 up
> ifconfig bridge1 add pair1 add pair3 stp pair1 stp pair3 up
> 
> and while destroying/creating stp root pair interfaces with
> kern.pool_debug=1 and kern.splassert=2 i'm getting this traces
> 
> splassert: bstp_notify_rtage: want 2 have 0
> Starting stack trace...
> bstp_update_tc(ffff8000004e0c00) at bstp_update_tc+0x338
> bstp_tick(ffff800000159700) at bstp_tick+0x357
> softclock(0) at softclock+0x123
> softintr_dispatch(0) at softintr_dispatch+0x11e
> Xsoftclock(0,0,1388,0,ffff800000021800,ffffffff81d0b6d0) at Xsoftclock+0x1f
> acpicpu_idle() at acpicpu_idle+0x281
> sched_idle(ffffffff81d0aff0) at sched_idle+0x235
> end trace frame: 0x0, count: 250
> End of stack trace.

It's an incorrect assert.  What's currently protecting all the bridge
data structures is the KERNEL_LOCK().  Does the diff below help?

Index: net/bridgestp.c
===================================================================
RCS file: /cvs/src/sys/net/bridgestp.c,v
retrieving revision 1.67
diff -u -p -r1.67 bridgestp.c
--- net/bridgestp.c     7 Dec 2018 16:17:51 -0000       1.67
+++ net/bridgestp.c     29 Mar 2019 14:31:48 -0000
@@ -1584,7 +1584,7 @@ bstp_notify_rtage(struct bstp_port *bp, 
 {
        int age = 0;
 
-       NET_ASSERT_LOCKED();
+       KERNEL_ASSERT_LOCKED();
 
        switch (bp->bp_protover) {
        case BSTP_PROTO_STP:

Reply via email to