All of lore.kernel.org
 help / color / mirror / Atom feed
From: Antonio Quartulli <ordex@autistici.org>
To: Nicolas Cavallari <Nicolas.Cavallari@lri.fr>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCHv3 2/2] mac80211: in IBSS use the Auth frame to trigger STA reinsertion
Date: Tue, 17 Jan 2012 15:00:09 +0100	[thread overview]
Message-ID: <20120117140008.GA2272@ritirata.org> (raw)
In-Reply-To: <4F157505.3060306@lri.fr>

Hi Nicolas and thank you for testing my patch!

On Tue, Jan 17, 2012 at 02:17:57 +0100, Nicolas Cavallari wrote:
> I tested your patch, but quickly run into a race condition where i would
> get Auth frame multiplication.
> 
> The worst case apparently happen when A boots for the first time and the
> first message that B receives is an Auth frame.  In that case, there are
> several ieee80211_ibss_add_sta() calls running concurrently on B  (A and
> B are SMP systems)  but only one succeeds,  except that your patch sends
> Auth frames before the check, so B sends several Auth frames to A.
> 
> Then A proceed to reset B.  After A deletes B's sta_info,  but before
> it reinserts it, some other code (ieee80211_ibss_rx_no_sta?) may call
> ieee80211_ibss_add_sta()  concurrently,  sending more Auth frames...
> increasing the odds of another race condition...

Thank you for debugging and having found the problem. Weird that I haven't seen
it before.

> 
> By calling send_auth only when sta_info_insert_rcu() succeeds, i'm no
> longer able to reproduce the Auth flood.

Sounds like a good hint. Better to send the auth frame only if we have already added
the new station to the list.

I will fix it in the next version

Regards,

-- 
Antonio Quartulli

..each of us alone is worth nothing..
Ernesto "Che" Guevara

      reply	other threads:[~2012-01-17 14:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-16 18:12 [PATCHv3 2/2] mac80211: in IBSS use the Auth frame to trigger STA reinsertion Antonio Quartulli
2012-01-17 13:17 ` Nicolas Cavallari
2012-01-17 14:00   ` Antonio Quartulli [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=20120117140008.GA2272@ritirata.org \
    --to=ordex@autistici.org \
    --cc=Nicolas.Cavallari@lri.fr \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.