提交 7b99a7c2 编写于 作者: J Johannes Berg 提交者: John W. Linville

mac80211: fix sw scan locking

The recent scan overhaul broke locking
because now we can jump to code that
attempts to unlock, while we don't have
the mutex held. Fix this by holding the
mutex around all the relevant code.
Reported-by: NBen Greear <greearb@candelatech.com>
Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 4b34d432
......@@ -681,8 +681,6 @@ void ieee80211_scan_work(struct work_struct *work)
goto out_complete;
}
mutex_unlock(&local->mtx);
/*
* as long as no delay is required advance immediately
* without scheduling a new work
......@@ -713,6 +711,7 @@ void ieee80211_scan_work(struct work_struct *work)
} while (next_delay == 0);
ieee80211_queue_delayed_work(&local->hw, &local->scan_work, next_delay);
mutex_unlock(&local->mtx);
return;
out_complete:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册