linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Ignacy Gawedzki <i@lri.fr>
Cc: linux-wireless@vger.kernel.org
Subject: Re: sta_find_ibss (active_ibss=1) in a loop?
Date: Mon, 06 Jun 2011 18:11:32 +0200	[thread overview]
Message-ID: <1307376692.3894.12.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <20110606160115.GA31258@zenon.in.qult.net>

On Mon, 2011-06-06 at 18:01 +0200, Ignacy Gawedzki wrote:

> > @@ -999,7 +1002,6 @@ int ieee80211_ibss_leave(struct ieee8021
> >  	kfree_skb(skb);
> >  
> >  	skb_queue_purge(&sdata->skb_queue);
> > -	memset(sdata->u.ibss.bssid, 0, ETH_ALEN);
> >  	sdata->u.ibss.ssid_len = 0;
> 
> Shouldn't that second line also move up with the memset?

Not really necessary -- that's not used in the RX path. But yeah we can
do that for consistency. Also maybe the skb queue purge.

> >  	del_timer_sync(&sdata->u.ibss.timer);
> 
> So this fix relies on the fact that reading sdata->i.ibss.state is an atomic
> operation, right?
> 
> Thanks for the patch, I'll give it a try, though it may be some time until I
> report further on this, since the problem is difficult to reproduce.

Oh ok. Well, I think we should put these changes in anyway since I see
nothing preventing the race now.

johannes


  reply	other threads:[~2011-06-06 16:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-03 20:16 sta_find_ibss (active_ibss=1) in a loop? Ignacy Gawedzki
2011-06-03 20:49 ` Ignacy Gawedzki
2011-06-06 11:04   ` Ignacy Gawedzki
2011-06-06 14:31     ` Johannes Berg
2011-06-06 16:01       ` Ignacy Gawedzki
2011-06-06 16:11         ` Johannes Berg [this message]
2011-06-08 11:13           ` Ignacy Gawedzki
2011-06-08 11:26             ` 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=1307376692.3894.12.camel@jlt3.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=i@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 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).