From: Ben Greear <greearb@candelatech.com>
To: Felix Fietkau <nbd@openwrt.org>
Cc: linux-wireless@vger.kernel.org, johannes@sipsolutions.net,
cprevotaux@nltinc.com
Subject: Re: [PATCH] mac80211: fix a memory leak on sta rate selection table
Date: Tue, 27 May 2014 09:34:55 -0700 [thread overview]
Message-ID: <5384BEAF.1030803@candelatech.com> (raw)
In-Reply-To: <1400866194-62234-1-git-send-email-nbd@openwrt.org>
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);
>
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
next prev parent reply other threads:[~2014-05-27 16:34 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 [this message]
2014-05-27 16:40 ` Christophe Prevotaux
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=5384BEAF.1030803@candelatech.com \
--to=greearb@candelatech.com \
--cc=cprevotaux@nltinc.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.