diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2008-10-07 12:04:29 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-10-14 20:46:41 -0400 |
commit | 63044e9f54b6bac50d2380bf4d14f63e9e7de72b (patch) | |
tree | 9ceddf721c869fb9450429fd4932d8c40b765486 /net/mac80211/sta_info.c | |
parent | 45527c2c4f698f8927239cfdec9f515cafed5f10 (diff) | |
download | linux-63044e9f54b6bac50d2380bf4d14f63e9e7de72b.tar.gz linux-63044e9f54b6bac50d2380bf4d14f63e9e7de72b.tar.bz2 linux-63044e9f54b6bac50d2380bf4d14f63e9e7de72b.zip |
mac80211: fix debugfs lockup
When debugfs_create_dir fails, sta_info_debugfs_add_work will not
terminate because it will find the same station again and again.
This is possible whenever debugfs fails for whatever reason; one
reason is a race condition in mac80211, unfortunately we cannot
do much about it, so just document it, it just means some station
may be missing from debugfs.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Robin Holt <holt@sgi.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/sta_info.c')
-rw-r--r-- | net/mac80211/sta_info.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index 9b72d15bc8dc..7fef8ea1f5ec 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c @@ -635,7 +635,12 @@ static void sta_info_debugfs_add_work(struct work_struct *work) spin_lock_irqsave(&local->sta_lock, flags); list_for_each_entry(tmp, &local->sta_list, list) { - if (!tmp->debugfs.dir) { + /* + * debugfs.add_has_run will be set by + * ieee80211_sta_debugfs_add regardless + * of what else it does. + */ + if (!tmp->debugfs.add_has_run) { sta = tmp; __sta_info_pin(sta); break; |