From: Christophe Prevotaux <cprevotaux@nltinc.com>
To: Ben Greear <greearb@candelatech.com>, Felix Fietkau <nbd@openwrt.org>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
"johannes@sipsolutions.net" <johannes@sipsolutions.net>
Subject: Re: [PATCH] mac80211: fix a memory leak on sta rate selection table
Date: Tue, 27 May 2014 18:40:44 +0200 [thread overview]
Message-ID: <5384C00C.4020507@nltinc.com> (raw)
In-Reply-To: <5384BEAF.1030803@candelatech.com>
Hi Ben,
In terms of OpenWRT world, at least backfire, did not go further back in
checking. I suspect it is much older than this though :) But I did
put on my spelunking head lamp and I am afraid of the dark :)
Maybe Felix would know ?
Regards
Christophe
On 05/27/2014 06:34 PM, Ben Greear wrote:
> On 05/23/2014 10:29 AM, Felix Fietkau wrote:
>> Cc: stable@vger.kernel.org
>> Reported-by: Christophe Prévotaux <cprevotaux@nltinc.com>
>> Signed-off-by: Felix Fietkau <nbd@openwrt.org>
>
> Any idea how far back this should be applied?
>
> Thanks,
> Ben
>
>> ---
>> net/mac80211/sta_info.c | 5 +++++
>> 1 file changed, 5 insertions(+)
>>
>> diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
>> index 632d372..8b42f49 100644
>> --- a/net/mac80211/sta_info.c
>> +++ b/net/mac80211/sta_info.c
>> @@ -227,6 +227,7 @@ 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)
>> {
>> + struct ieee80211_sta_rates *rates;
>> int i;
>>
>> if (sta->rate_ctrl)
>> @@ -238,6 +239,10 @@ void sta_info_free(struct ieee80211_local *local, struct sta_info *sta)
>> kfree(sta->tx_lat);
>> }
>>
>> + rates = rcu_dereference_protected(sta->sta.rates, true);
>> + if (rates)
>> + kfree(rates);
>> +
>> sta_dbg(sta->sdata, "Destroyed STA %pM\n", sta->sta.addr);
>>
>> kfree(sta);
>>
>
>
--
Christophe Prévotaux
cprevotaux@nltinc.com +1 416 425 6559 [ext 240]
Northern Light Technologies
33 Laird Drive
M4G 3S9, Toronto, ON
Canada
http://www.nltinc.com
next prev parent reply other threads:[~2014-05-27 16:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-23 17:29 [PATCH] mac80211: fix a memory leak on sta rate selection table Felix Fietkau
2014-05-27 16:34 ` Ben Greear
2014-05-27 16:40 ` Christophe Prevotaux [this message]
2014-05-27 17:01 ` Ben Greear
2014-05-27 20:28 ` Felix Fietkau
2014-05-27 17:55 ` Johannes Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5384C00C.4020507@nltinc.com \
--to=cprevotaux@nltinc.com \
--cc=greearb@candelatech.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=nbd@openwrt.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.