提交 adaed1b9 编写于 作者: J Johannes Berg

mac80211: fix 'reset' debugfs locking

cfg80211 now calls suspend/resume with the wiphy lock
held, and while there's a problem with that needing
to be fixed, we should do the same in debugfs.

Cc: stable@vger.kernel.org
Fixes: a05829a7 ("cfg80211: avoid holding the RTNL when calling the driver")
Link: https://lore.kernel.org/r/20210608113226.14020430e449.I78e19db0a55a8295a376e15ac4cf77dbb4c6fb51@changeidSigned-off-by: NJohannes Berg <johannes.berg@intel.com>
上级 d5befb22
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* *
* Copyright 2007 Johannes Berg <johannes@sipsolutions.net> * Copyright 2007 Johannes Berg <johannes@sipsolutions.net>
* Copyright 2013-2014 Intel Mobile Communications GmbH * Copyright 2013-2014 Intel Mobile Communications GmbH
* Copyright (C) 2018 - 2019 Intel Corporation * Copyright (C) 2018 - 2019, 2021 Intel Corporation
*/ */
#include <linux/debugfs.h> #include <linux/debugfs.h>
...@@ -389,8 +389,10 @@ static ssize_t reset_write(struct file *file, const char __user *user_buf, ...@@ -389,8 +389,10 @@ static ssize_t reset_write(struct file *file, const char __user *user_buf,
struct ieee80211_local *local = file->private_data; struct ieee80211_local *local = file->private_data;
rtnl_lock(); rtnl_lock();
wiphy_lock(local->hw.wiphy);
__ieee80211_suspend(&local->hw, NULL); __ieee80211_suspend(&local->hw, NULL);
__ieee80211_resume(&local->hw); __ieee80211_resume(&local->hw);
wiphy_unlock(local->hw.wiphy);
rtnl_unlock(); rtnl_unlock();
return count; return count;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册