On 5/15/2025 4:58 PM, Johannes Berg wrote:
On Thu, 2025-05-15 at 11:18 +0530, Sarika Sharma wrote:
+++ b/include/net/cfg80211.h
@@ -8579,7 +8579,16 @@ int cfg80211_sinfo_alloc_tid_stats(struct station_info *sinfo, gfp_t gfp);
*/
static inline void cfg80211_sinfo_release_content(struct station_info *sinfo)
{
+ int link_id;
+
kfree(sinfo->pertid);
+
+ for_each_valid_link(sinfo, link_id) {
+ if (sinfo->links[link_id]) {
Took me some time, but obviously this leaks memory all the time. The
hwsim tests blew up for me _immediately_ on this, FWIW, so maybe
consider changing your config to have more kernel debug stuff when you
run those. You do, right? :)
Sure, let me change the configs to avoid this in future.
Ultimately, also I know I said to do it this way, but now that I really
look and see how the tidstats are allocated on demand, we could do the
same here?
And then you don't even (later) need
cfg80211_link_sinfo_alloc_tid_stats(), allocating tid stats for the link
or not could be an argument to allocating the link?
Anyway maybe we don't need to change that right now, but I think longer
term that'd be the better internal API.
Sure, we can take this at later part.
johannes