Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH] mac80211: fix ethtool stats for non-station interfaces
@ 2013-07-08  8:46 Johannes Berg
  0 siblings, 0 replies; only message in thread
From: Johannes Berg @ 2013-07-08  8:46 UTC (permalink / raw)
  To: linux-wireless; +Cc: greearb

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 <johannes@sipsolutions.net>
---
 net/mac80211/cfg.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 8184d12..43dd752 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);
 		}
-- 
1.8.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-07-08  8:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-08  8:46 [PATCH] mac80211: fix ethtool stats for non-station interfaces Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox