All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Bob Copeland <me@bobcopeland.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [RFC v2 14/18] regulatory: clarify locking rules and assertions
Date: Wed, 05 Dec 2012 10:13:43 +0100	[thread overview]
Message-ID: <1354698823.9972.6.camel@jlt4.sipsolutions.net> (raw)
In-Reply-To: <20121204190730.GC29880@localhost> (sfid-20121204_200810_702954_7565575D)

On Tue, 2012-12-04 at 14:07 -0500, Bob Copeland wrote:
> On Tue, Dec 04, 2012 at 03:48:56PM +0100, Johannes Berg wrote:
> > Many places that currently check that cfg80211_
> > The function needs to hold the cfg80211_mutex as
> > it uses the global cfg80211_regdomain variable, so
> > add the lock assertion to it and fix one of the
> > callers that doesn't hold that mutex.
> 
> Something missing in the description there?

Completely wrong ... looks like I got interrupted while writing it or
something ...

Here's what I changed it to now:

    Many places that currently check that cfg80211_mutex
    is held don't actually use any data protected by it.
    The functions that need to hold the cfg80211_mutex
    are the ones using the cfg80211_regdomain variable,
    so add the lock assertion to those and clarify this
    in the comments.
    
    The reason for this is that nl80211 uses the regdom
    without being able to hold reg_mutex.


johannes


  reply	other threads:[~2012-12-05  9:13 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-04 14:48 regulatory cleanups & fixes Johannes Berg
2012-12-04 14:48 ` [RFC v2 01/18] regulatory: don't allocate too much memory Johannes Berg
2012-12-04 14:48 ` [RFC v2 02/18] regulatory: clean up reg_copy_regd() Johannes Berg
2012-12-04 14:48 ` [RFC v2 03/18] regulatory: don't test list before iterating Johannes Berg
2012-12-04 14:48 ` [RFC v2 04/18] regulatory: simplify regulatory_hint_11d Johannes Berg
2012-12-04 14:48 ` [RFC v2 05/18] regulatory: code cleanup Johannes Berg
2012-12-04 14:48 ` [RFC v2 06/18] regulatory: remove useless locking on exit Johannes Berg
2012-12-04 14:48 ` [RFC v2 07/18] regulatory: use proper enum for return values Johannes Berg
2012-12-04 14:48 ` [RFC v2 08/18] cfg80211: remove wiphy_idx_valid Johannes Berg
2012-12-04 14:48 ` [RFC v2 09/18] regulatory: remove BUG_ON Johannes Berg
2012-12-04 14:48 ` [RFC v2 10/18] regulatory: simplify restore_regulatory_settings Johannes Berg
2012-12-04 14:48 ` [RFC v2 11/18] regulatory: remove redundant isalpha() check Johannes Berg
2012-12-04 14:48 ` [RFC v2 12/18] regulatory: remove useless warning Johannes Berg
2012-12-04 14:48 ` [RFC v2 13/18] regulatory: simplify freq_reg_info_regd Johannes Berg
2012-12-04 14:48 ` [RFC v2 14/18] regulatory: clarify locking rules and assertions Johannes Berg
2012-12-04 19:07   ` Bob Copeland
2012-12-05  9:13     ` Johannes Berg [this message]
2012-12-04 14:48 ` [RFC v2 15/18] regulatory: remove locking from wiphy_apply_custom_regulatory Johannes Berg
2012-12-04 14:48 ` [RFC v2 16/18] regulatory: fix reg_is_valid_request handling Johannes Berg
2012-12-04 14:48 ` [RFC v2 17/18] regulatory: remove handling of channel bandwidth Johannes Berg
2012-12-04 14:49 ` [RFC v2 18/18] regulatory: allow arbitrary channel widths 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=1354698823.9972.6.camel@jlt4.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=me@bobcopeland.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.