svn commit: r192419 - head/sys/dev/usb/wlan
Weongyo Jeong
weongyo at FreeBSD.org
Wed May 20 03:49:17 UTC 2009
Author: weongyo
Date: Wed May 20 03:49:16 2009
New Revision: 192419
URL: http://svn.freebsd.org/changeset/base/192419
Log:
try to unsetup USB xfers before calling ieee80211_ifdetach() to fix a
bug referencing a destroyed lock within TX callbacks during device
detach.
Submitted by: hps (original version)
Tested by: Lucius Windschuh <lwindschuh at googlemail.com>
Modified:
head/sys/dev/usb/wlan/if_uath.c
head/sys/dev/usb/wlan/if_upgt.c
Modified: head/sys/dev/usb/wlan/if_uath.c
==============================================================================
--- head/sys/dev/usb/wlan/if_uath.c Wed May 20 03:33:27 2009 (r192418)
+++ head/sys/dev/usb/wlan/if_uath.c Wed May 20 03:49:16 2009 (r192419)
@@ -517,12 +517,12 @@ uath_detach(device_t dev)
sc->sc_flags |= UATH_FLAG_INVALID;
uath_stop(ifp);
- ieee80211_ifdetach(ic);
callout_drain(&sc->stat_ch);
callout_drain(&sc->watchdog_ch);
usb2_transfer_unsetup(sc->sc_xfer, UATH_N_XFERS);
+ ieee80211_ifdetach(ic);
/* free buffers */
UATH_LOCK(sc);
Modified: head/sys/dev/usb/wlan/if_upgt.c
==============================================================================
--- head/sys/dev/usb/wlan/if_upgt.c Wed May 20 03:33:27 2009 (r192418)
+++ head/sys/dev/usb/wlan/if_upgt.c Wed May 20 03:49:16 2009 (r192419)
@@ -2002,12 +2002,12 @@ upgt_detach(device_t dev)
return 0;
upgt_stop(sc);
- ieee80211_ifdetach(ic);
callout_drain(&sc->sc_led_ch);
callout_drain(&sc->sc_watchdog_ch);
usb2_transfer_unsetup(sc->sc_xfer, UPGT_N_XFERS);
+ ieee80211_ifdetach(ic);
upgt_free_rx(sc);
upgt_free_tx(sc);
More information about the svn-src-head
mailing list