diff options
author | Greg Kroah-Hartman <gregkh@google.com> | 2020-11-22 10:17:08 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2020-11-22 10:17:08 +0100 |
commit | d5c6e5dc0e1d6a32151260ee7d699e5935522daa (patch) | |
tree | 3ba0d40308e97ef6a5f13cfe28b538618220d304 /net/mac80211 | |
parent | 4e6c6e008513d98396bf9f92bf38b83b6980fa54 (diff) | |
parent | 899c58731b77ce6bbf991286b016be278a23a2da (diff) |
Merge 4.4.245 into android-4.4-p
Changes in 4.4.245
powerpc/64s: Define MASKABLE_RELON_EXCEPTION_PSERIES_OOL
powerpc/64s: move some exception handlers out of line
powerpc/64s: flush L1D on kernel entry
powerpc: Add a framework for user access tracking
powerpc: Implement user_access_begin and friends
powerpc: Fix __clear_user() with KUAP enabled
powerpc/uaccess: Evaluate macro arguments once, before user access is allowed
powerpc/64s: flush L1D after user accesses
i2c: imx: Fix external abort on interrupt in exit paths
xfs: catch inode allocation state mismatch corruption
xfs: validate cached inodes are free when allocated
powerpc/8xx: Always fault when _PAGE_ACCESSED is not set
Input: sunkbd - avoid use-after-free in teardown paths
mac80211: always wind down STA state
KVM: x86: clflushopt should be treated as a no-op by emulation
Linux 4.4.245
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I78cbd0900d1b7be38a6d7e588bff9189bc8f1718
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/sta_info.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index bbddab248c48..6f7c3f6a5027 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c @@ -242,6 +242,24 @@ struct sta_info *sta_info_get_by_idx(struct ieee80211_sub_if_data *sdata, */ void sta_info_free(struct ieee80211_local *local, struct sta_info *sta) { + /* + * If we had used sta_info_pre_move_state() then we might not + * have gone through the state transitions down again, so do + * it here now (and warn if it's inserted). + * + * This will clear state such as fast TX/RX that may have been + * allocated during state transitions. + */ + while (sta->sta_state > IEEE80211_STA_NONE) { + int ret; + + WARN_ON_ONCE(test_sta_flag(sta, WLAN_STA_INSERTED)); + + ret = sta_info_move_state(sta, sta->sta_state - 1); + if (WARN_ONCE(ret, "sta_info_move_state() returned %d\n", ret)) + break; + } + if (sta->rate_ctrl) rate_control_free_sta(sta); |