Index | Thread | Search

From:
Vitaliy Makkoveev <mvs@openbsd.org>
Subject:
Re: Bug Reported by me today Create, Bridge, change bridge timeout and then destroy bridge kernel panic
To:
Tom Smyth <tom.smyth@wirelessconnect.eu>
Cc:
tech <tech@openbsd.org>
Date:
Tue, 3 Nov 2026 20:25:12 +0000

Download raw body.

Thread
On Tue, Nov 03, 2026 at 06:41:16PM +0000, Tom Smyth wrote:
> Folks I tested the following patch ( with assistance  from ai)
> and it stopped the panic on AMD64 on 8.0  on 5 separate runs
> 
> Index: sys/net/if_bridge.c
> --- sys/net/if_bridge.c.orig
> +++ sys/net/if_bridge.c
> @@ -231,6 +231,7 @@
>   NET_ASSERT_UNLOCKED();
> 
>   bridge_stop(sc);
> + timeout_del_barrier(&sc->sc_brtimeout);
>   bridge_rtflush(sc, IFBF_FLUSHALL);
>   while ((bif = SMR_SLIST_FIRST_LOCKED(&sc->sc_iflist)) != NULL)
>   bridge_ifremove(bif);
> Index: sys/net/bridgectl.c
> --- sys/net/bridgectl.c.orig
> +++ sys/net/bridgectl.c
> @@ -113,9 +113,11 @@
>   break;
>   }
>   sc->sc_brttimeout = bparam->ifbrp_ctime;
> - if (bparam->ifbrp_ctime != 0)
> - timeout_add_sec(&sc->sc_brtimeout, sc->sc_brttimeout);
> - else
> + if (bparam->ifbrp_ctime != 0) {
> + if (ISSET(ifp->if_flags, IFF_RUNNING))
> + timeout_add_sec(&sc->sc_brtimeout,
> +    sc->sc_brttimeout);
> + } else
>   timeout_del(&sc->sc_brtimeout);
>   break;
>   case SIOCBRDGGTO:
> 

The first hunk looks unnecessary to me. Also, please format your diff
according style(9).