From: Johannes Berg <johannes@sipsolutions.net>
To: "Luis R. Rodriguez" <lrodriguez@atheros.com>
Cc: linville@tuxdriver.com, gregoryx.alagnou@intel.com,
linux-wireless@vger.kernel.org
Subject: Re: [PATCH v3 1/2] cfg80211: fix regulatory restore upon user hints
Date: Fri, 01 Apr 2011 23:49:34 +0200 [thread overview]
Message-ID: <1301694574.3842.6.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <AANLkTimHCgmoWvC_Ou7BsiDjwxF=YB0h4-g=_afYxsQF@mail.gmail.com>
On Fri, 2011-04-01 at 14:47 -0700, Luis R. Rodriguez wrote:
> On Fri, Apr 1, 2011 at 1:28 PM, Johannes Berg <johannes@sipsolutions.net> wrote:
> > On Fri, 2011-04-01 at 13:10 -0700, Luis R. Rodriguez wrote:
> >>
> >> The order should not matter except that we want the queue to be
> >> cleared before processing core hints when doing restoration, otherwise
> >> the next user hint in the queue can be bogus and it will prevent a
> >> restore.
> >
> > I'm just thinking this temporary clearing could cause us to reject a
> > reply from CRDA that's coming in at the same time that is due to a user
> > request.
>
> Ah, I see, hmm well I tested this with:
>
> iw reg set US; iw reg set XA; iw reg set XB; iw reg set CR; iw dev
> wlan0 disconnect; iw reg set FR;
was CRDA running though? If so, it will probably reply right away -- I
don't think you can hit the race easily.
> and things were still being processed in the order sent. There is a
> small race between the unlock of the reg_mutex on
> restore_regulatory_settings() down until where we lock the
> regulatory_hint_core() and regulatory_hint_user(). The chances of a
> user regulatory hint coming in between is very low, I could not do it.
> Then there is also a small race of getting a user reg hint on
> restore_regulatory_settings() in between the regulatory_hint_user()
> and the lock of the reg_mutex again for processing old regulatory
> hints, but the worst that can happen in that case is we squeeze in a
> user regulatory hint in before the other older regulatory hints, and
> this is fine.
>
> I cannot see any other cases here where we'd block a request from userspace.
No not block a request. I'm just thinking that this taking things off
the list temporarily might erroneously discard a crda response.
johannes
next prev parent reply other threads:[~2011-04-01 21:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-01 19:42 [PATCH v3 1/2] cfg80211: fix regulatory restore upon user hints Luis R. Rodriguez
2011-04-01 19:59 ` Johannes Berg
2011-04-01 20:10 ` Luis R. Rodriguez
2011-04-01 20:28 ` Johannes Berg
2011-04-01 21:47 ` Luis R. Rodriguez
2011-04-01 21:49 ` Johannes Berg [this message]
2011-04-01 22:22 ` Luis R. Rodriguez
2011-04-04 12:19 ` Johannes Berg
2011-04-04 19:57 ` Luis R. Rodriguez
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=1301694574.3842.6.camel@jlt3.sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=gregoryx.alagnou@intel.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=lrodriguez@atheros.com \
/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).