• Johannes Berg's avatar
    mac80211: fix ibss race · 51f98f13
    Johannes Berg authored
    When a scan completes, we call ieee80211_sta_find_ibss(),
    which is also called from other places. When the scan was
    done in software, there's no problem as both run from the
    single-threaded mac80211 workqueue and are thus serialised
    against each other, but with hardware scan the completion
    can be in a different context and race against callers of
    this function from the workqueue (e.g. due to beacon RX).
    So instead of calling ieee80211_sta_find_ibss() directly,
    just arm the timer and have it fire, scheduling the work,
    which will invoke ieee80211_sta_find_ibss() (if that is
    appropriate in the current state).
    Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
    Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
    51f98f13
ibss.c 25.6 KB