summaryrefslogtreecommitdiffstats
path: root/sys/dev/bce
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2006-07-20 18:41:00 +0000
committerjhb <jhb@FreeBSD.org>2006-07-20 18:41:00 +0000
commit70fe8b72794c098354c508524bb2659d1e34b35f (patch)
tree464e95a4914663f22d92aa143741eacc61c009fb /sys/dev/bce
parent004ef88e091610da1220afc72fb1ebd0bf2aae8a (diff)
downloadFreeBSD-src-70fe8b72794c098354c508524bb2659d1e34b35f.zip
FreeBSD-src-70fe8b72794c098354c508524bb2659d1e34b35f.tar.gz
Expand locking coverage slightly to cover if_drv_flags in a few places
where it wasn't locked. MFC after: 3 days Reviewed by: davidch
Diffstat (limited to 'sys/dev/bce')
-rw-r--r--sys/dev/bce/if_bce.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/sys/dev/bce/if_bce.c b/sys/dev/bce/if_bce.c
index da63eaf..1550a95 100644
--- a/sys/dev/bce/if_bce.c
+++ b/sys/dev/bce/if_bce.c
@@ -4840,9 +4840,11 @@ bce_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
DBPRINT(sc, BCE_INFO, "Setting new MTU of %d\n", ifr->ifr_mtu);
+ BCE_LOCK(sc);
ifp->if_mtu = ifr->ifr_mtu;
ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
- bce_init(sc);
+ bce_init_locked(sc);
+ BCE_UNLOCK(sc);
break;
/* Set interface. */
@@ -4877,12 +4879,12 @@ bce_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
case SIOCDELMULTI:
DBPRINT(sc, BCE_VERBOSE, "Received SIOCADDMULTI/SIOCDELMULTI\n");
+ BCE_LOCK(sc);
if (ifp->if_drv_flags & IFF_DRV_RUNNING) {
- BCE_LOCK(sc);
bce_set_rx_mode(sc);
- BCE_UNLOCK(sc);
error = 0;
}
+ BCE_UNLOCK(sc);
break;
@@ -5031,10 +5033,12 @@ bce_watchdog(struct ifnet *ifp)
/* DBRUN(BCE_FATAL, bce_breakpoint(sc)); */
+ BCE_LOCK(sc);
ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
- bce_init(sc);
+ bce_init_locked(sc);
ifp->if_oerrors++;
+ BCE_UNLOCK(sc);
}
OpenPOWER on IntegriCloud