From: Arik Nemtsov <arik@wizery.com>
To: <linux-wireless@vger.kernel.org>
Cc: Johannes Berg <johannes.berg@intel.com>,
"Luis R. Rodriguez" <mcgrof@do-not-panic.com>,
Arik Nemtsov <arik@wizery.com>
Subject: [PATCH 2/2] regulatory: take RTNL when restoring settings on CRDA timeout
Date: Sun, 21 Jul 2013 16:36:49 +0300 [thread overview]
Message-ID: <1374413809-26005-2-git-send-email-arik@wizery.com> (raw)
In-Reply-To: <1374413809-26005-1-git-send-email-arik@wizery.com>
The RTNL has to be held since this potentially changes the regdomain.
Locking was forgotten here due to recent locking simplification changes.
Signed-off-by: Arik Nemtsov <arik@wizery.com>
---
net/wireless/reg.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 1ec3933..b25390a 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -2285,7 +2285,9 @@ void wiphy_regulatory_deregister(struct wiphy *wiphy)
static void reg_timeout_work(struct work_struct *work)
{
REG_DBG_PRINT("Timeout while waiting for CRDA to reply, restoring regulatory settings\n");
+ rtnl_lock();
restore_regulatory_settings(true);
+ rtnl_unlock();
}
int __init regulatory_init(void)
--
1.8.1.2
next prev parent reply other threads:[~2013-07-21 13:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-21 13:36 [PATCH 1/2] regulatory: use correct regulatory initiator on wiphy register Arik Nemtsov
2013-07-21 13:36 ` Arik Nemtsov [this message]
2013-07-21 14:10 ` [PATCH 2/2] regulatory: take RTNL when restoring settings on CRDA timeout Sujith Manoharan
2013-07-21 14:18 ` Arik Nemtsov
2013-07-23 18:21 ` [PATCH 1/2] regulatory: use correct regulatory initiator on wiphy register Luis R. Rodriguez
2013-07-25 7:53 ` 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=1374413809-26005-2-git-send-email-arik@wizery.com \
--to=arik@wizery.com \
--cc=johannes.berg@intel.com \
--cc=linux-wireless@vger.kernel.org \
--cc=mcgrof@do-not-panic.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