linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
To: Michael Buesch <mb@bu3sch.de>
Cc: Larry Finger <Larry.Finger@lwfinger.net>,
	"Hin-Tak Leung" <hintak.leung@gmail.com>,
	Pavel Roskin <proski@gnu.org>,
	wireless <linux-wireless@vger.kernel.org>
Subject: Re: [RFC/RFT] rtl8187: Protect the config callback from mac80211 with a mutex
Date: Wed, 30 Jul 2008 15:11:11 -0300	[thread overview]
Message-ID: <200807301511.12267.herton@mandriva.com.br> (raw)
In-Reply-To: <200807301946.41182.mb@bu3sch.de>

Em Wednesday 30 July 2008 14:46:40 Michael Buesch escreveu:
> On Wednesday 30 July 2008 19:13:52 Herton Ronaldo Krzesinski wrote:
> > > Yeah, I said exactly that.
> > > You protect the loopback stuff. Not any config callback or anything else.
> > 
> > Ah ok, only protect the section, like this?
> 
> Yeah, well. In theory, yes. In practice: Aren't there other races possible, too?
> I mean even races with other parts of the driver.
> b43 needs to take the global driver mutex in the conf callback to make
> sure nothing changes (device init state probably is the most important one.
> Device going down while configuring would be a fatal crash).

In practice I don't get other problems, but better to stick to the patch posted
by Larry, like he said to avoid config data from one call mixed to the other.
rtl8187 is more simpler, besides this issue with configuration it all depends
on how mac80211 calls another functions, I have yet to see but doesn't look like
a general lock is needed.

> 
> So in b43 we have a global mutex which protects everything (all data
> and all device state), except the data and state that's accessed in the IRQ paths.
> (We have more locks for shared device memory and so on... But these are nested
> inside of the mutex or the IRQ state lock)
> 

-- 
[]'s
Herton

  reply	other threads:[~2008-07-30 18:11 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-30  6:12 [RFC/RFT] rtl8187: Protect the config callback from mac80211 with a mutex Larry Finger
2008-07-30 13:24 ` Michael Buesch
2008-07-30 13:27   ` Michael Buesch
2008-07-30 14:53     ` Herton Ronaldo Krzesinski
2008-07-30 15:02       ` Michael Buesch
2008-07-30 16:08         ` Herton Ronaldo Krzesinski
2008-07-30 16:16           ` Michael Buesch
2008-07-30 17:13             ` Herton Ronaldo Krzesinski
2008-07-30 17:31               ` Larry Finger
2008-07-30 17:46               ` Michael Buesch
2008-07-30 18:11                 ` Herton Ronaldo Krzesinski [this message]
2008-07-30 18:41                   ` Michael Buesch
2008-07-30 19:26                   ` Hin-Tak Leung
2008-07-30 13:27 ` Herton Ronaldo Krzesinski

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=200807301511.12267.herton@mandriva.com.br \
    --to=herton@mandriva.com.br \
    --cc=Larry.Finger@lwfinger.net \
    --cc=hintak.leung@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=mb@bu3sch.de \
    --cc=proski@gnu.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).