diff options
author | phk <phk@FreeBSD.org> | 2005-01-06 23:13:50 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2005-01-06 23:13:50 +0000 |
commit | 962238ddac8a4ea021a17ba0987a1aeac36ceb2d (patch) | |
tree | 8f49a824b9cdddbb96902a1f2ea00ac84e365361 /sys/pci | |
parent | 8d58b9df12c91ca0ca53c8b0332657873656e436 (diff) | |
download | FreeBSD-src-962238ddac8a4ea021a17ba0987a1aeac36ceb2d.zip FreeBSD-src-962238ddac8a4ea021a17ba0987a1aeac36ceb2d.tar.gz |
Close a theoretical race: By the time the watchdog comes around
the interface may have been stopped, so we should not restart it.
Diffstat (limited to 'sys/pci')
-rw-r--r-- | sys/pci/if_sis.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/pci/if_sis.c b/sys/pci/if_sis.c index a933173..e257db3 100644 --- a/sys/pci/if_sis.c +++ b/sys/pci/if_sis.c @@ -2235,11 +2235,15 @@ sis_ioctl(struct ifnet *ifp, u_long command, caddr_t data) static void sis_watchdog(struct ifnet *ifp) { - struct sis_softc *sc; + struct sis_softc *sc; sc = ifp->if_softc; SIS_LOCK(sc); + if (sc->sis_stopped) { + SIS_UNLOCK(sc); + return; + } ifp->if_oerrors++; printf("sis%d: watchdog timeout\n", sc->sis_unit); |