kernel/iwn: Grab the WLAN serializer around ieee80211_ifdetach()
authorJohannes Hofmann <johannes.hofmann@gmx.de>
Sun, 16 Aug 2015 11:46:22 +0000 (13:46 +0200)
committerJohannes Hofmann <johannes.hofmann@gmx.de>
Sun, 16 Aug 2015 11:46:22 +0000 (13:46 +0200)
This fixes a panic on kldunload.

sys/dev/netif/iwn/if_iwn.c

index 8b408b8..5c65f2d 100644 (file)
@@ -1422,7 +1422,9 @@ iwn_detach(device_t dev)
 
                callout_drain(&sc->watchdog_to);
                callout_drain(&sc->calib_to);
+               wlan_serialize_enter();
                ieee80211_ifdetach(ic);
+               wlan_serialize_exit();
        }
 
        /* Uninstall interrupt handler. */