git: 6af0ee7423bd - stable/15 - if_bridge(4): don't sleep under epoch(9) in destruction
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 14 Apr 2026 10:58:14 UTC
The branch stable/15 has been updated by pouria:
URL: https://cgit.FreeBSD.org/src/commit/?id=6af0ee7423bd1bbbad64fa033be3d4d0c675e331
commit 6af0ee7423bd1bbbad64fa033be3d4d0c675e331
Author: Pouria Mousavizadeh Tehrani <pouria@FreeBSD.org>
AuthorDate: 2026-03-16 12:53:45 +0000
Commit: Pouria Mousavizadeh Tehrani <pouria@FreeBSD.org>
CommitDate: 2026-04-14 10:52:29 +0000
if_bridge(4): don't sleep under epoch(9) in destruction
bridge tries to run callout_drain(9) twice under epoch
during destruction.
once for bridge_timer, which is not required to be under epoch.
second time for the BSTP callout, which is already disabled
earlier inside bridge_delete_member.
Reviewed by: glebius, zlei
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D55876
(cherry picked from commit a8b9a05d3cad3bdcb9008232c9172a1aeffbe9fd)
---
sys/net/if_bridge.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c
index ca15deddaf7d..c9ee7d742238 100644
--- a/sys/net/if_bridge.c
+++ b/sys/net/if_bridge.c
@@ -955,8 +955,6 @@ bridge_clone_destroy(struct if_clone *ifc, struct ifnet *ifp, uint32_t flags)
BRIDGE_UNLOCK(sc);
- NET_EPOCH_ENTER(et);
-
callout_drain(&sc->sc_brcallout);
BRIDGE_LIST_LOCK();
@@ -964,6 +962,8 @@ bridge_clone_destroy(struct if_clone *ifc, struct ifnet *ifp, uint32_t flags)
BRIDGE_LIST_UNLOCK();
bstp_detach(&sc->sc_stp);
+
+ NET_EPOCH_ENTER(et);
#ifdef ALTQ
IFQ_PURGE(&ifp->if_snd);
#endif