]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/mac80211/debugfs_sta.c
Merge branch 'drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
[linux-2.6-omap-h63xx.git] / net / mac80211 / debugfs_sta.c
index b9902e425f096f336f93c97aa2a4494508de4272..189d0bafa91ae0f274c2813f912012679f53903d 100644 (file)
@@ -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;