summaryrefslogtreecommitdiffstats
path: root/net/wireless
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2018-02-27 11:22:15 +0100
committerJohannes Berg <johannes.berg@intel.com>2018-03-29 11:11:50 +0200
commit5bf16a11ba2940c67d0b3a2154813bb42e8c6281 (patch)
treeee97c73c151536a071f5917ffa79175d82fb4721 /net/wireless
parent230ebaa189af44d50dccb4a1846e39ca594e347b (diff)
downloadop-kernel-dev-5bf16a11ba2940c67d0b3a2154813bb42e8c6281.zip
op-kernel-dev-5bf16a11ba2940c67d0b3a2154813bb42e8c6281.tar.gz
cfg80211: don't require RTNL held for regdomain reads
The whole code is set up to allow RCU reads of this data, but then uses rtnl_dereference() which requires the RTNL. Convert it to rcu_dereference_rtnl() which makes it require only RCU or the RTNL, to allow RCU-protected reading of the data. Reviewed-by: Coelho, Luciano <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless')
-rw-r--r--net/wireless/reg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index eddc834..e352a0d 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -135,12 +135,12 @@ static void restore_regulatory_settings(bool reset_user);
static const struct ieee80211_regdomain *get_cfg80211_regdom(void)
{
- return rtnl_dereference(cfg80211_regdomain);
+ return rcu_dereference_rtnl(cfg80211_regdomain);
}
const struct ieee80211_regdomain *get_wiphy_regdom(struct wiphy *wiphy)
{
- return rtnl_dereference(wiphy->regd);
+ return rcu_dereference_rtnl(wiphy->regd);
}
static const char *reg_dfs_region_str(enum nl80211_dfs_regions dfs_region)
OpenPOWER on IntegriCloud