From: Johannes Berg Part of the RTNL removal here means the notifier will no longer hold the RTNL, so rcu_dereference_rtnl() can't be used any more. Use an RCU critical section which works either way, we don't have access to the cfg80211_mutex in the drivers. Signed-off-by: Johannes Berg --- drivers/net/wireless/ath/ath11k/reg.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath11k/reg.c b/drivers/net/wireless/ath/ath11k/reg.c index 0879a132b67c..1030e119fd90 100644 --- a/drivers/net/wireless/ath/ath11k/reg.c +++ b/drivers/net/wireless/ath/ath11k/reg.c @@ -33,7 +33,9 @@ static bool ath11k_regdom_changes(struct ath11k *ar, char *alpha2) { const struct ieee80211_regdomain *regd; - regd = rcu_dereference_rtnl(ar->hw->wiphy->regd); + guard(rcu)(); + + regd = get_wiphy_regdom(ar->hw->wiphy); /* This can happen during wiphy registration where the previous * user request is received before we update the regd received * from firmware. -- 2.55.0