Linux wireless drivers development
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: "Luis R. Rodriguez" <mcgrof@gmail.com>
Cc: linux-wireless <linux-wireless@vger.kernel.org>
Subject: Re: SME warning on 2.6.32-rc<bleh>
Date: Fri, 16 Oct 2009 19:09:11 +0900	[thread overview]
Message-ID: <1255687751.4095.333.camel@johannes.local> (raw)
In-Reply-To: <43e72e890909291224t26b7e6cbmc78976165bd1bb88@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1503 bytes --]

On Tue, 2009-09-29 at 12:24 -0700, Luis R. Rodriguez wrote:
> I believe the problem comes from the assumption from cfg80211 that
> previous deauthentications would have gone through before we run
> __cfg80211_disconnected() and are using wext or nl80211
> connec/disconnectt. Under certain conditions (clearly not known yet)
> this is not true and we'll end up asking mac80211 to deauthenticate us
> from a BSS we already deauthenticated to end end up with an -ENOLINK
> on our mac80211 cfg80211 deauth ops. It seems this race was expected
> all along on mac80211 ieee80211_mgd_deauth():
> 
>         /*
>          * cfg80211 should catch this ... but it's racy since
>          * we can receive a deauth frame, process it, hand it
>          * to cfg80211 while that's in a locked section already
>          * trying to tell us that the user wants to disconnect.
>          */
>         if (!bssid) {
>                 mutex_unlock(&ifmgd->mtx);
>                 return -ENOLINK;
>         }
> 
> So it seems we do need to address that race but I'm not yet sure how.

I don't think so. The race is definitely there in mac80211, but not in
cfg80211, since both processing the deauth frame and sending a deauth
frame in cfg80211 are both under the same lock.

OTOH, it could happen with lock contention, but that seems very unlikely
here?

I mean -- this race should only happen if the AP and you decide to
deauth at the /same/ time. Precisely the same time.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

      parent reply	other threads:[~2009-10-16 11:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-29 19:24 SME warning on 2.6.32-rc<bleh> Luis R. Rodriguez
2009-09-30 23:12 ` Luis R. Rodriguez
2009-09-30 23:19   ` Luis R. Rodriguez
2009-10-16 10:09 ` Johannes Berg [this message]

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=1255687751.4095.333.camel@johannes.local \
    --to=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=mcgrof@gmail.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