diff options
author | Amol Grover <frextrite@gmail.com> | 2020-02-19 12:11:04 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2020-02-21 14:11:30 +0300 |
commit | 3ee9306b353bdd0c0cd7cd3a549233e1ad44b608 (patch) | |
tree | 6c53a398806c2da8365b3aa31e05977d29288f50 /net/wireless | |
parent | 92df9f8a745ee9b8cc250514272345cb2e74e7ef (diff) | |
download | linux-3ee9306b353bdd0c0cd7cd3a549233e1ad44b608.tar.xz |
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: Amol Grover <frextrite@gmail.com>
Link: https://lore.kernel.org/r/20200219091102.10709-1-frextrite@gmail.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless')
-rw-r--r-- | net/wireless/scan.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/wireless/scan.c b/net/wireless/scan.c index aef240fdf8df..7f1af8f347b1 100644 --- a/net/wireless/scan.c +++ b/net/wireless/scan.c @@ -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; } |