diff options
author | cokane <cokane@FreeBSD.org> | 2008-07-09 00:10:55 +0000 |
---|---|---|
committer | cokane <cokane@FreeBSD.org> | 2008-07-09 00:10:55 +0000 |
commit | 798aa25682441d77c93888a4e20d5084742fa74d (patch) | |
tree | 45e782aed1aff8cd47ef7c7e38108c10365006e9 /sys/dev | |
parent | e80b338f3b688d4192426fc44dd65e3d065dd500 (diff) | |
download | FreeBSD-src-798aa25682441d77c93888a4e20d5084742fa74d.zip FreeBSD-src-798aa25682441d77c93888a4e20d5084742fa74d.tar.gz |
Fix a mutex LOR introduced by the conversion of if_ndis from spinlocks to
mutexes and replacing the obsolete if_watchdog interface. The ndis_ticktask
function calls into ieee80211_new_state under one condition with NDIS_LOCK
held. The ieee80211_new_state would call into ndis_start in some cases too,
resulting in the occasional case where ndis_start acquires NDIS_LOCK from
inside the NDIS_LOCK held by ndis_ticktask.
Obtained from: Paul B. Mahol <onemda@gmail.com>
MFC after: 1 week
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/if_ndis/if_ndis.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/dev/if_ndis/if_ndis.c b/sys/dev/if_ndis/if_ndis.c index 30600f4..4981a2e 100644 --- a/sys/dev/if_ndis/if_ndis.c +++ b/sys/dev/if_ndis/if_ndis.c @@ -1717,8 +1717,10 @@ ndis_ticktask(d, xsc) if (sc->ndis_link == 1 && sc->ndis_sts == NDIS_STATUS_MEDIA_DISCONNECT) { sc->ndis_link = 0; + NDIS_UNLOCK(sc); if (sc->ndis_80211) ieee80211_new_state(vap, IEEE80211_S_SCAN, 0); + NDIS_LOCK(sc); if_link_state_change(sc->ifp, LINK_STATE_DOWN); } |