diff options
author | David S. Miller <davem@davemloft.net> | 2008-10-14 23:19:16 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-10-14 23:19:16 -0700 |
commit | ab55570d64d5409fa940e85dd8de2594b160f826 (patch) | |
tree | 4010f080f2631e046ee4b5dcb29c8df2cfb9ee7e /net/mac80211/debugfs_sta.c | |
parent | eef9d90dcde7bb4d029b67ed36457efc4970d5a2 (diff) | |
parent | 8713a7ccd88d93d9f8a72436088d6627c82490db (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Diffstat (limited to 'net/mac80211/debugfs_sta.c')
-rw-r--r-- | net/mac80211/debugfs_sta.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c index b9902e425f0..189d0bafa91 100644 --- a/net/mac80211/debugfs_sta.c +++ b/net/mac80211/debugfs_sta.c @@ -249,11 +249,22 @@ void ieee80211_sta_debugfs_add(struct sta_info *sta) DECLARE_MAC_BUF(mbuf); u8 *mac; + sta->debugfs.add_has_run = true; + if (!stations_dir) return; mac = print_mac(mbuf, sta->sta.addr); + /* + * This might fail due to a race condition: + * When mac80211 unlinks a station, the debugfs entries + * remain, but it is already possible to link a new + * station with the same address which triggers adding + * it to debugfs; therefore, if the old station isn't + * destroyed quickly enough the old station's debugfs + * dir might still be around. + */ sta->debugfs.dir = debugfs_create_dir(mac, stations_dir); if (!sta->debugfs.dir) return; |