From: Johannes Berg Date: Mon, 8 Jul 2013 08:43:31 +0000 (+0200) Subject: mac80211: fix ethtool stats for non-station interfaces X-Git-Tag: MMI-PSA29.97-13-9~13727^2~84^2^2~7^2~18 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e13bae4f807401729b3f27c7e882a96b8b292809;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git mac80211: fix ethtool stats for non-station interfaces As reported in https://bugzilla.kernel.org/show_bug.cgi?id=60514, the station loop never initialises 'sinfo' and therefore adds up a stack values, leaking stack information (the number of times it adds values is easily obtained another way.) Fix this by initialising the sinfo for each station to add. Cc: stable@vger.kernel.org Signed-off-by: Johannes Berg --- diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 8184d121ff09..43dd7525bfcb 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -666,6 +666,8 @@ static void ieee80211_get_et_stats(struct wiphy *wiphy, if (sta->sdata->dev != dev) continue; + sinfo.filled = 0; + sta_set_sinfo(sta, &sinfo); i = 0; ADD_STA_STATS(sta); }