Skip to content

Commit

Permalink
wifi: nl80211: acquire wdev mutex for dump_survey
Browse files Browse the repository at this point in the history
At least the quantenna driver calls wdev_chandef() here
which now requires the lock, so acquire it.

Fixes: 7b0a0e3 ("wifi: cfg80211: do some rework towards MLO link APIs")
Signed-off-by: Johannes Berg <[email protected]>
  • Loading branch information
jmberg-intel committed Jul 15, 2022
1 parent e2722d2 commit 284b38b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net/wireless/nl80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -10233,7 +10233,9 @@ static int nl80211_dump_survey(struct sk_buff *skb, struct netlink_callback *cb)
}

while (1) {
wdev_lock(wdev);
res = rdev_dump_survey(rdev, wdev->netdev, survey_idx, &survey);
wdev_unlock(wdev);
if (res == -ENOENT)
break;
if (res)
Expand Down

0 comments on commit 284b38b

Please sign in to comment.