linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Larry Finger <Larry.Finger@lwfinger.net>
Cc: "John W. Linville" <linville@tuxdriver.com>,
	linux-wireless@vger.kernel.org
Subject: Re: [PATCH] b43: Fix locking problem when stopping rfkill polling
Date: Thu, 08 Oct 2009 00:36:55 +0200	[thread overview]
Message-ID: <1254955015.3713.9.camel@johannes.local> (raw)
In-Reply-To: <4ACCEBE8.8010803@lwfinger.net>

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

On Wed, 2009-10-07 at 14:28 -0500, Larry Finger wrote:

> > OK, but why do we start polling under the lock but stop polling without
> > the lock?  Should we start polling without holding the lock too?
> 
> I'll test that, but I suspect it doesn't matter. Of course, the reason
> I put the stop under the lock was for symmetry, but then I got the
> following when shutting down:
> 
>  b43-phy0 debug: Removing Interface type 2
> 
>  =======================================================
>  [ INFO: possible circular locking dependency detected ]
>  2.6.32-rc3-wl #225
>  -------------------------------------------------------
>  modprobe/25391 is trying to acquire lock:
>   (&(&rfkill->poll_work)->work){+.+...}, at: [<ffffffff81054a7f>]
> __cancel_work_timer+0xd9/0x224

This is because when stopping polling we need to cancel the work and
sync on it, but when starting it's completely async so starting can be
in any context.

johannes

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

  parent reply	other threads:[~2009-10-07 22:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-07 15:06 [PATCH] b43: Fix locking problem when stopping rfkill polling Larry Finger
2009-10-07 19:01 ` John W. Linville
2009-10-07 19:28   ` Larry Finger
2009-10-07 19:46     ` Michael Buesch
2009-10-07 22:36     ` Johannes Berg [this message]
2009-10-07 22:43       ` Larry Finger
2009-10-07 23:08         ` Michael Buesch
2009-10-08 20:23   ` Larry Finger
2009-10-08 22:31     ` John W. Linville

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=1254955015.3713.9.camel@johannes.local \
    --to=johannes@sipsolutions.net \
    --cc=Larry.Finger@lwfinger.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.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;
as well as URLs for NNTP newsgroup(s).