linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Larry Finger <larry.finger@lwfinger.net>
To: Michael Buesch <mb@bu3sch.de>
Cc: bcm43xx-dev@lists.berlios.de, linux-wireless@vger.kernel.org
Subject: Re: [RFC/T V2] b43: Fix Radio On/Off LED action
Date: Wed, 28 Nov 2007 11:08:17 -0600	[thread overview]
Message-ID: <474DA081.7030101@lwfinger.net> (raw)
In-Reply-To: <200711281746.56069.mb@bu3sch.de>

Michael Buesch wrote:
> On Wednesday 28 November 2007 17:41:42 Larry Finger wrote:
>> Michael Buesch wrote:
>>> I think it's a different bug. The backtrace seems corrupted.
>>>
>>> Can you try this patch? There is some circular locking in rfkill.
>> I still get circular locking. The dump is
> 
> Ok.
> 
> b43 init:
> 	mutex_lock(wl->mutex)
> 	rfkill_init()
> 		mutex_lock(rfkill->mutex)
> 
> in operation:
> 	rfkill poll (no locks held)
> 	calls into rfkill
> 	mutex_lock(rfkill->mutex)
> 	b43_rfkill_soft_toggle()
> 		mutex_lock(wl->mutex)
> 
> As you can see the lock ordering of the two mutexes
> is different. The problem is that we cannot easily drop
> the wl->mutex on b43 init, as that would introduce some
> race conditions. This is specific to b43 and rt2x00 most
> likely doesn't have this requirement.
> I'm not sure how to properly fix this.

Your analysis is correct. I wrapped the call to b43_rfkill_init() with an unlock/lock pair of calls
(races be damned) and the circular locking message went away. BTW, that kind of wrapping is already
done for b43_rfkill_exit(). Curious.

Larry

      reply	other threads:[~2007-11-28 17:08 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-27 16:03 [RFC/T] b43: Fix Radio On/Off LED action Larry Finger
2007-11-27 16:13 ` Michael Buesch
2007-11-27 16:28   ` Larry Finger
2007-11-27 17:05     ` Michael Buesch
2007-11-27 18:29       ` Ehud Gavron
2007-11-27 20:02   ` [RFC/T V2] " Larry Finger
2007-11-27 20:20     ` Michael Buesch
2007-11-27 21:22       ` Larry Finger
2007-11-28 14:11         ` Michael Buesch
2007-11-28 15:05           ` Larry Finger
2007-11-28 16:13             ` Michael Buesch
2007-11-28 16:41               ` Larry Finger
2007-11-28 16:46                 ` Michael Buesch
2007-11-28 17:08                   ` Larry Finger [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=474DA081.7030101@lwfinger.net \
    --to=larry.finger@lwfinger.net \
    --cc=bcm43xx-dev@lists.berlios.de \
    --cc=linux-wireless@vger.kernel.org \
    --cc=mb@bu3sch.de \
    /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).