wifi: mac80211: mlme: Fix missing unlock on beacon RX
authorRafael Mendonca <rafaelmendsr@gmail.com>
Sat, 24 Sep 2022 18:40:41 +0000 (15:40 -0300)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 27 Sep 2022 08:33:51 +0000 (10:33 +0200)
commit883b8dc1a8766464d5bde4d97e1d7c795d990d31
tree38e85cd1180ede7584b82ff36531ce5419731d24
parentbe92292b90bfdc31f332c962882b6d3ea0285fdf
wifi: mac80211: mlme: Fix missing unlock on beacon RX

Commit 98b0b467466c ("wifi: mac80211: mlme: use correct link_sta")
switched to link station instead of deflink and added some checks to do
that, which are done with the 'sta_mtx' mutex held. However, the error
path of these checks does not unlock 'sta_mtx' before returning.

Fixes: 98b0b467466c ("wifi: mac80211: mlme: use correct link_sta")
Signed-off-by: Rafael Mendonca <rafaelmendsr@gmail.com>
Link: https://lore.kernel.org/r/20220924184042.778676-1-rafaelmendsr@gmail.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/mlme.c