1 From: Johannes Berg <johannes.berg@intel.com>
3 The recent scan overhaul broke locking
4 because now we can jump to code that
5 attempts to unlock, while we don't have
6 the mutex held. Fix this by holding the
7 mutex around all the relevant code.
9 Reported-by: Ben Greear <greearb@candelatech.com>
10 Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 net/mac80211/scan.c | 3 +--
13 1 file changed, 1 insertion(+), 2 deletions(-)
15 --- a/net/mac80211/scan.c
16 +++ b/net/mac80211/scan.c
17 @@ -686,8 +686,6 @@ void ieee80211_scan_work(struct work_str
21 - mutex_unlock(&local->mtx);
24 * as long as no delay is required advance immediately
25 * without scheduling a new work
26 @@ -718,6 +716,7 @@ void ieee80211_scan_work(struct work_str
27 } while (next_delay == 0);
29 ieee80211_queue_delayed_work(&local->hw, &local->scan_work, next_delay);
30 + mutex_unlock(&local->mtx);