From 5ff336ca897deb829e414d3f56fd3defd9759139 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 13 Jan 2020 19:43:20 +0100 Subject: [PATCH] mac80211: fix sta TID stats leak on a few nl80211 calls Signed-off-by: Felix Fietkau (cherry-picked from commit d5b3024139089e38f57bd1827273d7fba8497635) --- ...ory-leak-in-cfg80211_cqm_rssi_update.patch | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 package/kernel/mac80211/patches/subsys/369-cfg80211-fix-memory-leak-in-cfg80211_cqm_rssi_update.patch diff --git a/package/kernel/mac80211/patches/subsys/369-cfg80211-fix-memory-leak-in-cfg80211_cqm_rssi_update.patch b/package/kernel/mac80211/patches/subsys/369-cfg80211-fix-memory-leak-in-cfg80211_cqm_rssi_update.patch new file mode 100644 index 0000000000..d205140783 --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/369-cfg80211-fix-memory-leak-in-cfg80211_cqm_rssi_update.patch @@ -0,0 +1,21 @@ +From: Felix Fietkau +Date: Wed, 8 Jan 2020 18:03:04 +0100 +Subject: [PATCH] cfg80211: fix memory leak in cfg80211_cqm_rssi_update + +The per-tid statistics need to be released after the call to rdev_get_station + +Cc: stable@vger.kernel.org +Fixes: 8689c051a201 ("cfg80211: dynamically allocate per-tid stats for station info") +Signed-off-by: Felix Fietkau +--- + +--- a/net/wireless/nl80211.c ++++ b/net/wireless/nl80211.c +@@ -10346,6 +10346,7 @@ static int cfg80211_cqm_rssi_update(stru + if (err) + return err; + ++ cfg80211_sinfo_release_content(&sinfo); + if (sinfo.filled & BIT_ULL(NL80211_STA_INFO_BEACON_SIGNAL_AVG)) + wdev->cqm_config->last_rssi_event_value = + (s8) sinfo.rx_beacon_signal_avg; -- 2.25.1