Commit 206bbcf7 authored by Johannes Berg's avatar Johannes Berg

wifi: nl80211: hold wdev mutex for tid config

We need wdev_chandef() in this code, which now requires
the wdev mutex due to the per-link nature. Hold it here
to make sure we can access the link.

Reported-by: syzbot+b4e9aa0f32ffd9902442@syzkaller.appspotmail.com
Fixes: 7b0a0e3c ("wifi: cfg80211: do some rework towards MLO link APIs")
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 77e7b6ba
...@@ -15433,6 +15433,8 @@ static int nl80211_set_tid_config(struct sk_buff *skb, ...@@ -15433,6 +15433,8 @@ static int nl80211_set_tid_config(struct sk_buff *skb,
if (info->attrs[NL80211_ATTR_MAC]) if (info->attrs[NL80211_ATTR_MAC])
tid_config->peer = nla_data(info->attrs[NL80211_ATTR_MAC]); tid_config->peer = nla_data(info->attrs[NL80211_ATTR_MAC]);
wdev_lock(dev->ieee80211_ptr);
nla_for_each_nested(tid, info->attrs[NL80211_ATTR_TID_CONFIG], nla_for_each_nested(tid, info->attrs[NL80211_ATTR_TID_CONFIG],
rem_conf) { rem_conf) {
ret = nla_parse_nested(attrs, NL80211_TID_CONFIG_ATTR_MAX, ret = nla_parse_nested(attrs, NL80211_TID_CONFIG_ATTR_MAX,
...@@ -15454,6 +15456,7 @@ static int nl80211_set_tid_config(struct sk_buff *skb, ...@@ -15454,6 +15456,7 @@ static int nl80211_set_tid_config(struct sk_buff *skb,
bad_tid_conf: bad_tid_conf:
kfree(tid_config); kfree(tid_config);
wdev_unlock(dev->ieee80211_ptr);
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment