X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=net%2Fmac80211%2Fdebugfs_sta.c;h=189d0bafa91ae0f274c2813f912012679f53903d;hb=0552f297951d0ab3a1027f9b06fa40c9be8378ba;hp=b9902e425f096f336f93c97aa2a4494508de4272;hpb=20272c8994cf1e1f8ed745a2ea161dd9ad3889f2;p=linux-2.6-omap-h63xx.git 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;