diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2013-07-08 10:43:31 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-11 18:35:22 -0700 |
commit | 090577c961e0843004762905bfcee2d6bf262722 (patch) | |
tree | 47f2ce7aa9789f6c51aafca0f87a153bb528a003 /net | |
parent | fd14e26686ae1729c25cf9c938eed826eb825e9d (diff) | |
download | linux-3.10-090577c961e0843004762905bfcee2d6bf262722.tar.gz linux-3.10-090577c961e0843004762905bfcee2d6bf262722.tar.bz2 linux-3.10-090577c961e0843004762905bfcee2d6bf262722.zip |
mac80211: fix ethtool stats for non-station interfaces
commit e13bae4f807401729b3f27c7e882a96b8b292809 upstream.
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.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/cfg.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 4fdb306e42e..ae36f8e11ae 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -652,6 +652,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); } |