]> git.baikalelectronics.ru Git - kernel.git/commit
wifi: mac80211: sta_info: fix link_sta insertion
authorJohannes Berg <johannes.berg@intel.com>
Tue, 19 Jul 2022 10:08:29 +0000 (12:08 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 22 Jul 2022 12:28:19 +0000 (14:28 +0200)
commit4ebc60a8f74747ed974b2ce9f7cecd2c3cb5d6b6
treea0aa864f3929ed187554a1259adde5795e84fa09
parentec6aef867dbcd0920a33f7ede7877f99397e6a65
wifi: mac80211: sta_info: fix link_sta insertion

When inserting a link STA, make sure it doesn't exist first
and add lockdep assertions that we cannot modify the hash
table without holding the sta_mtx, so this check is really
correct.

Also return without hashing if the driver failed, and warn
if the hashing fails, which shouldn't happen due to the
check described above.

Fixes: 7f810b4c9479 ("wifi: mac80211: add sta link addition/removal")
Fixes: 2810cc7c2e08 ("wifi: mac80211: maintain link-sta hash table")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/sta_info.c