public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: "Luis R. Rodriguez" <lrodriguez@atheros.com>
Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org
Subject: Re: [PATCH 6/6] cfg80211: move regulatory hints to workqueue
Date: Fri, 13 Feb 2009 08:48:54 +0100	[thread overview]
Message-ID: <1234511334.1327.34.camel@johannes.local> (raw)
In-Reply-To: <43e72e890902122335l6580dbc1m44702996cc8200e4@mail.gmail.com> (sfid-20090213_084150_789218_6A367D4F)

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

On Thu, 2009-02-12 at 23:35 -0800, Luis R. Rodriguez wrote:

> > Well, regardless of regulatory, we now have two paths:
> >
> > nl80211: cfg80211_mutex  -->  drv->mutex  -->  rtnl
> > wext:    rtnl  -->  cfg80211_mutex  -->  drv->mutex
> >
> > which is clearly not a good plan.
> >
> > Therefore, I'll probably have to implement solution (1) from what I sent
> > you, and invert the locking in nl80211. That would fix your the
> > immediate problem with regulatory as well, because that was:
> >
> > rtnl  --->  (regulatory_hint) --->  cfg80211_mutex  -->  drv->mutex
> 
> Yup I see. So as it stands in this patch user reg hint now is:
> 
> reg_mutex --> cfg80211_mutex

I don't really care about reg_mutex much, and it probably doesn't matter
as long as its use is limited. Question is whether we need it, but
that's a different question.

> Driver hint also does the same so it seems your fix on nl80211 would
> probably just tap this series on the nl80211_req_set_reg().

Yeah, I think I'll work on top of your series anyway so I don't clash
with the cleanups.

> I also think using a workqueue would be good here anyway, the only
> negative thing I've seen is loading takes a bit longer.

Indeed, it's a good thing because a path like this:

driver_open
 -> regulatory_hint
  -> cfg80211 stuff
   -> driver_reg_notifier

is always deadlock prone since you call into the driver from itself.

johannes

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

  reply	other threads:[~2009-02-13  7:49 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-13  5:35 [PATCH 0/6] cfg80211: adds a workqueue for regulatory hints Luis R. Rodriguez
2009-02-13  5:35 ` [PATCH 1/6] cfg80211: rename cfg80211_registered_device's idx to wiphy_idx Luis R. Rodriguez
2009-02-13  5:35   ` [PATCH 2/6] cfg80211: add wiphy_idx_valid to check for wiphy_idx sanity Luis R. Rodriguez
2009-02-13  5:36     ` [PATCH 3/6] cfg80211: rename cfg80211_drv_mutex to cfg80211_mutex Luis R. Rodriguez
2009-02-13  5:36       ` [PATCH 4/6] cfg80211: add assert_cfg80211_lock() to ensure proper protection Luis R. Rodriguez
2009-02-13  5:36         ` [PATCH 5/6] cfg80211: make regulatory_request use wiphy_idx instead of wiphy Luis R. Rodriguez
2009-02-13  5:36           ` [PATCH 6/6] cfg80211: move regulatory hints to workqueue Luis R. Rodriguez
2009-02-13  6:56             ` Johannes Berg
2009-02-13  7:09               ` Luis R. Rodriguez
2009-02-13  7:14                 ` Luis R. Rodriguez
2009-02-13  7:14                   ` Luis R. Rodriguez
2009-02-13  7:17                     ` Johannes Berg
2009-02-13  7:35                       ` Luis R. Rodriguez
2009-02-13  7:48                         ` Johannes Berg [this message]
2009-02-13  7:57                           ` Luis R. Rodriguez
2009-02-13  8:08                             ` Johannes Berg
2009-02-13  8:19                               ` Luis R. Rodriguez
2009-02-13 11:04           ` [PATCH 5/6] cfg80211: make regulatory_request use wiphy_idx instead of wiphy Johannes Berg
2009-02-13 18:21             ` Luis R. Rodriguez
2009-02-13 21:24               ` Johannes Berg
2009-02-13 21:40                 ` Luis R. Rodriguez
2009-02-13  6:54         ` [PATCH 4/6] cfg80211: add assert_cfg80211_lock() to ensure proper protection Johannes Berg
2009-02-13  7:08           ` Luis R. Rodriguez
2009-02-13  6:53     ` [PATCH 2/6] cfg80211: add wiphy_idx_valid to check for wiphy_idx sanity Johannes Berg
2009-02-13  7:08       ` Luis R. Rodriguez
2009-02-13  7:18         ` Johannes Berg
2009-02-13  9:13 ` [PATCH 0/6] cfg80211: adds a workqueue for regulatory hints 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=1234511334.1327.34.camel@johannes.local \
    --to=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=lrodriguez@atheros.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