mac80211: fix deadlock with multiple interfaces
The locking around ieee80211_recalc_smps is buggy -- it cannot acquire another interface's mutex while the iflist mutex is held because another code path could be holding the iface mutex and trying to acquire the iflist mutex. But the locking is also unnecessary, we only check "ifmgd->associated" as a bool, and don't use the pointer (in check_mgd_smps). Reported-by: Ben Greear <greearb@candelatech.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
committed by
John W. Linville
parent
6774889314
commit
025e6be220
@ -333,7 +333,7 @@ static void ieee80211_recalc_smps_work(struct work_struct *work)
|
||||
container_of(work, struct ieee80211_local, recalc_smps);
|
||||
|
||||
mutex_lock(&local->iflist_mtx);
|
||||
ieee80211_recalc_smps(local, NULL);
|
||||
ieee80211_recalc_smps(local);
|
||||
mutex_unlock(&local->iflist_mtx);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user