svn commit: r343387 - head/sys/dev/iwm

Kyle Evans kevans at FreeBSD.org
Thu Jan 24 03:49:12 UTC 2019


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 at 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


More information about the svn-src-all mailing list