Search Linux Wireless

Re: [PATCH wireless-next v8 05/10] wifi: cfg80211: allocate memory for link_station info structure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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? :)


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.

johannes






[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux