Date: Fri, 10 Aug 2018 13:06:14 +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: r337570 - head/sys/dev/bwi Message-ID: <201808101306.w7AD6EnG068612@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kevans Date: Fri Aug 10 13:06:14 2018 New Revision: 337570 URL: https://svnweb.freebsd.org/changeset/base/337570 Log: bwi(4): Set ic->ic_softc before bwi_getradiocaps to avoid bad deref Submitted by: François Revol <revol@free.fr> Obtained from: Haiku (ba88131cfde64e21bedb4ebedd699cfa5e7fd314) MFC after: 1 week Modified: head/sys/dev/bwi/if_bwi.c Modified: head/sys/dev/bwi/if_bwi.c ============================================================================== --- head/sys/dev/bwi/if_bwi.c Fri Aug 10 10:37:25 2018 (r337569) +++ head/sys/dev/bwi/if_bwi.c Fri Aug 10 13:06:14 2018 (r337570) @@ -490,10 +490,12 @@ bwi_attach(struct bwi_softc *sc) BWI_SPROM_CARD_INFO_LOCALE); DPRINTF(sc, BWI_DBG_ATTACH, "locale: %d\n", sc->sc_locale); /* XXX use locale */ + + ic->ic_softc = sc; + bwi_getradiocaps(ic, IEEE80211_CHAN_MAX, &ic->ic_nchans, ic->ic_channels); - ic->ic_softc = sc; ic->ic_name = device_get_nameunit(dev); ic->ic_caps = IEEE80211_C_STA | IEEE80211_C_SHSLOT |
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201808101306.w7AD6EnG068612>