Commit 3ee9306b authored by Amol Grover's avatar Amol Grover Committed by Johannes Berg

cfg80211: Pass lockdep expression to RCU lists

rdev->sched_scan_req_list maybe traversed using list_for_each_entry_rcu
outside an RCU read-side critical section but under the protection
of rtnl_mutex.

Hence, add corresponding lockdep expression to silence false-positive
warnings, and harden RCU lists.
Signed-off-by: default avatarAmol Grover <frextrite@gmail.com>
Link: https://lore.kernel.org/r/20200219091102.10709-1-frextrite@gmail.comSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 92df9f8a
......@@ -556,9 +556,8 @@ cfg80211_find_sched_scan_req(struct cfg80211_registered_device *rdev, u64 reqid)
{
struct cfg80211_sched_scan_request *pos;
WARN_ON_ONCE(!rcu_read_lock_held() && !lockdep_rtnl_is_held());
list_for_each_entry_rcu(pos, &rdev->sched_scan_req_list, list) {
list_for_each_entry_rcu(pos, &rdev->sched_scan_req_list, list,
lockdep_rtnl_is_held()) {
if (pos->reqid == reqid)
return pos;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment