浏览代码

regulatory: add missing rtnl locking

restore_regulatory_settings() requires the RTNL to be held,
add the missing locking in reg_timeout_work().

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg 12 年之前
父节点
当前提交
f77b86d7d3
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      net/wireless/reg.c

+ 2 - 0
net/wireless/reg.c

@@ -2279,7 +2279,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)