]> git.baikalelectronics.ru Git - kernel.git/commit
wifi: mac80211: mlme: Fix double unlock on assoc success handling
authorRafael Mendonca <rafaelmendsr@gmail.com>
Sun, 25 Sep 2022 14:34:19 +0000 (11:34 -0300)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 27 Sep 2022 08:34:45 +0000 (10:34 +0200)
commit18de556a8ea7c0818c840f7a8056bbbf0cb51dde
tree35ea08ffdbee0f2e83dda1225864da757006c9ee
parent4806b246902c81982f18ecaea047b00cd460ad29
wifi: mac80211: mlme: Fix double unlock on assoc success handling

Commit 918fcf4d9244 ("wifi: mac80211: mlme: refactor assoc success
handling") moved the per-link setup out of ieee80211_assoc_success() into a
new function ieee80211_assoc_config_link() but missed to remove the unlock
of 'sta_mtx' in case of HE capability/operation missing on HE AP, which
leads to a double unlock:

ieee80211_assoc_success() {
    ...
    ieee80211_assoc_config_link() {
        ...
        if (!(link->u.mgd.conn_flags & IEEE80211_CONN_DISABLE_HE) &&
            (!elems->he_cap || !elems->he_operation)) {
            mutex_unlock(&sdata->local->sta_mtx);
            ...
        }
        ...
    }
    ...
    mutex_unlock(&sdata->local->sta_mtx);
    ...
}

Fixes: 918fcf4d9244 ("wifi: mac80211: mlme: refactor assoc success handling")
Signed-off-by: Rafael Mendonca <rafaelmendsr@gmail.com>
Link: https://lore.kernel.org/r/20220925143420.784975-1-rafaelmendsr@gmail.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/mlme.c