Commit 65e8d5b8 authored by Johannes Berg's avatar Johannes Berg
Browse files

cfg80211: fix P2P-Device stop locking



cfg80211_stop_p2p_device() requires the devlist_mtx to
be held, but nl80211_stop_p2p_device() doesn't acquire
it which is a locking error and causes a warning (when
lockdep is enabled). Fix this.

Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent a42c74ee
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -8159,9 +8159,11 @@ static int nl80211_stop_p2p_device(struct sk_buff *skb, struct genl_info *info)
	if (!rdev->ops->stop_p2p_device)
	if (!rdev->ops->stop_p2p_device)
		return -EOPNOTSUPP;
		return -EOPNOTSUPP;


	mutex_lock(&rdev->devlist_mtx);
	mutex_lock(&rdev->sched_scan_mtx);
	mutex_lock(&rdev->sched_scan_mtx);
	cfg80211_stop_p2p_device(rdev, wdev);
	cfg80211_stop_p2p_device(rdev, wdev);
	mutex_unlock(&rdev->sched_scan_mtx);
	mutex_unlock(&rdev->sched_scan_mtx);
	mutex_unlock(&rdev->devlist_mtx);


	return 0;
	return 0;
}
}