Close a theoretical race: By the time the watchdog comes around
the interface may have been stopped, so we should not restart it.
This commit is contained in:
parent
86cb007f9f
commit
c884a1dc23
@ -2235,11 +2235,15 @@ sis_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
|
|||||||
static void
|
static void
|
||||||
sis_watchdog(struct ifnet *ifp)
|
sis_watchdog(struct ifnet *ifp)
|
||||||
{
|
{
|
||||||
struct sis_softc *sc;
|
struct sis_softc *sc;
|
||||||
|
|
||||||
sc = ifp->if_softc;
|
sc = ifp->if_softc;
|
||||||
|
|
||||||
SIS_LOCK(sc);
|
SIS_LOCK(sc);
|
||||||
|
if (sc->sis_stopped) {
|
||||||
|
SIS_UNLOCK(sc);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
ifp->if_oerrors++;
|
ifp->if_oerrors++;
|
||||||
printf("sis%d: watchdog timeout\n", sc->sis_unit);
|
printf("sis%d: watchdog timeout\n", sc->sis_unit);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user