Date: Wed, 20 May 2009 03:49:17 +0000 (UTC) From: Weongyo Jeong <weongyo@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r192419 - head/sys/dev/usb/wlan Message-ID: <200905200349.n4K3nHSe018257@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905200349.n4K3nHSe018257>