From: Robin Holt <holt@sgi.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: Robin Holt <holt@sgi.com>,
linux-wireless@vger.kernel.org, Jiri Slaby <jirislaby@gmail.com>,
Michael Wu <flamingice@sourmilk.net>, Jiri Benc <jbenc@suse.cz>
Subject: Re: Infinite loop in sta_info_debugfs_add_work().
Date: Sat, 4 Oct 2008 21:31:43 -0500 [thread overview]
Message-ID: <20081005023143.GJ8534@sgi.com> (raw)
In-Reply-To: <1223165956.24551.76.camel@johannes.berg>
On Sun, Oct 05, 2008 at 02:19:16AM +0200, Johannes Berg wrote:
...
> The code's trying to add debugfs entries for all STAs that don't have
> any yet. I suspect that maybe you don't have debugfs configured into
> your kernel or something is wrong; anyway, the code is really abusing
> the debugfs.dir as a flag "need to run ieee80211_sta_debugfs_add"; the
> problem is that ieee80211_sta_debugfs_add() doesn't necessarily set
> debugfs.dir to != NULL under all circumstances.
>
> I think we'll have to add a flag, do you have a way to reproduce this?
> Can you try this patch?
Will try it. To reproduce, suspend, wait 5 or so minutes, resume,
repeat until your keyboard leds stop flashing (usually within 3 or so
cycles). I think this will kick us out of the loop.
As for not configured correctly, I just took the standard Ubuntu config
and answered the unconfigured items with their default settings.
Thanks,
Robin Holt
>
> johannes
>
> --- everything.orig/net/mac80211/debugfs_sta.c 2008-10-05 02:16:51.000000000 +0200
> +++ everything/net/mac80211/debugfs_sta.c 2008-10-05 02:17:06.000000000 +0200
> @@ -249,6 +249,8 @@ void ieee80211_sta_debugfs_add(struct st
> DECLARE_MAC_BUF(mbuf);
> u8 *mac;
>
> + sta->debugfs.add_has_run = true;
> +
> if (!stations_dir)
> return;
>
> --- everything.orig/net/mac80211/sta_info.c 2008-10-05 02:16:06.000000000 +0200
> +++ everything/net/mac80211/sta_info.c 2008-10-05 02:18:12.000000000 +0200
> @@ -635,7 +635,12 @@ static void sta_info_debugfs_add_work(st
>
> 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;
> --- everything.orig/net/mac80211/sta_info.h 2008-10-05 02:16:09.000000000 +0200
> +++ everything/net/mac80211/sta_info.h 2008-10-05 02:17:13.000000000 +0200
> @@ -312,6 +312,7 @@ struct sta_info {
> struct dentry *wme_tx_queue;
> #endif
> struct dentry *agg_status;
> + bool add_has_run;
> } debugfs;
> #endif
>
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2008-10-05 2:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-04 10:31 Infinite loop in sta_info_debugfs_add_work() Robin Holt
2008-10-05 0:19 ` Johannes Berg
2008-10-05 2:31 ` Robin Holt [this message]
2008-10-05 8:38 ` Johannes Berg
2008-10-06 6:45 ` Robin Holt
2008-10-06 8:57 ` Johannes Berg
2008-10-06 13:30 ` Robin Holt
2008-10-06 22:09 ` Johannes Berg
2008-10-07 22:52 ` Robin Holt
2008-10-08 7:58 ` Johannes Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081005023143.GJ8534@sgi.com \
--to=holt@sgi.com \
--cc=flamingice@sourmilk.net \
--cc=jbenc@suse.cz \
--cc=jirislaby@gmail.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).