diff options
author | thompsa <thompsa@FreeBSD.org> | 2005-08-15 02:54:29 +0000 |
---|---|---|
committer | thompsa <thompsa@FreeBSD.org> | 2005-08-15 02:54:29 +0000 |
commit | 5eb423e0c4771bad7f41dae55e419c942ff7d5b4 (patch) | |
tree | dd35e0ee208b5585a70f74b07a555306b25654de /sys/net/bridgestp.c | |
parent | 97eb04040af69ed9912a118a91116b8511b3e685 (diff) | |
download | FreeBSD-src-5eb423e0c4771bad7f41dae55e419c942ff7d5b4.zip FreeBSD-src-5eb423e0c4771bad7f41dae55e419c942ff7d5b4.tar.gz |
Ensure that we are holding the lock when initialising the bridge interface. We
could initialise while unlocked if the bridge is not up when setting the inet
address, ether_ioctl() would call bridge_init.
Change it so bridge_init is always called unlocked and then locks before
calling bstp_initialization().
Reported by: Michal Mertl
Approved by: mlaier (mentor)
MFC after: 3 days
Diffstat (limited to 'sys/net/bridgestp.c')
-rw-r--r-- | sys/net/bridgestp.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/net/bridgestp.c b/sys/net/bridgestp.c index b4d0a82..6e8f0a1 100644 --- a/sys/net/bridgestp.c +++ b/sys/net/bridgestp.c @@ -830,6 +830,8 @@ bstp_initialization(struct bridge_softc *sc) { struct bridge_iflist *bif, *mif; + BRIDGE_LOCK_ASSERT(sc); + mif = NULL; LIST_FOREACH(bif, &sc->sc_iflist, bif_next) { if ((bif->bif_flags & IFBIF_STP) == 0) |