Date: Thu, 24 Jan 2019 03:49:12 +0000 (UTC) From: Kyle Evans <kevans@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r343387 - head/sys/dev/iwm Message-ID: <201901240349.x0O3nC5i026268@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kevans Date: Thu Jan 24 03:49:11 2019 New Revision: 343387 URL: https://svnweb.freebsd.org/changeset/base/343387 Log: iwm - Fix race during detach, where a callout is left after driver is gone. Submitted by: Augustin Cavalier <waddlesplash@gmail.com> (Haiku) Obtained from: DragonFlyBSD (ba3b4ff9a1fc04a349df05d6d3449f4d9b15c4be) Modified: head/sys/dev/iwm/if_iwm.c head/sys/dev/iwm/if_iwm_led.c Modified: head/sys/dev/iwm/if_iwm.c ============================================================================== --- head/sys/dev/iwm/if_iwm.c Thu Jan 24 03:48:50 2019 (r343386) +++ head/sys/dev/iwm/if_iwm.c Thu Jan 24 03:49:11 2019 (r343387) @@ -4829,6 +4829,9 @@ iwm_watchdog(void *arg) struct iwm_softc *sc = arg; struct ieee80211com *ic = &sc->sc_ic; + if (sc->sc_attached == 0) + return; + if (sc->sc_tx_timer > 0) { if (--sc->sc_tx_timer == 0) { device_printf(sc->sc_dev, "device timeout\n"); Modified: head/sys/dev/iwm/if_iwm_led.c ============================================================================== --- head/sys/dev/iwm/if_iwm_led.c Thu Jan 24 03:48:50 2019 (r343386) +++ head/sys/dev/iwm/if_iwm_led.c Thu Jan 24 03:49:11 2019 (r343387) @@ -162,6 +162,9 @@ iwm_led_blink_timeout(void *arg) { struct iwm_softc *sc = arg; + if (sc->sc_attached == 0) + return; + if (iwm_mvm_led_is_enabled(sc)) iwm_mvm_led_disable(sc); else
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201901240349.x0O3nC5i026268>